Skip to content

Commit

Permalink
Update Registration Param Values (#43)
Browse files Browse the repository at this point in the history
* Updated SDK to include BACKGROUND_REFRESH policy for actions

* Updated ReadMe for BACKGROUND_REFRESH

* Add Destroy method

* Included methods to clear cache

* Updated url end point

* Updated regions with correct values

* Refactored

* Updated read

* Updated Readme

* Removed unused files

* Updated send metrics api to send only the metrics array

* included support for boolean and integer for custom attributes

* Refactored

* Fix to ensure that existing custom parameters update the user registration

* Fix to ensure default json for cached parameter is empty

* Updated ui for in app messages

* Updated destroy method

* Add license header

* Add license file

* Update JitPack badge

* Update sample link

* Code cleanup and update API description

* Revert "Merge master"

This reverts commit c9f6cc4, reversing
changes made to 4347ad9.

* Update App Credentials

* Change Platform Name

 bluemix-mobile-services/bmd-project-applauch#627

* Fix InApp Message Problem

bluemix-mobile-services/bmd-project-applauch#630

* Remove Location Permission

bluemix-mobile-services/bmd-project-applauch#351
  • Loading branch information
vittalpai authored and srinivasannanduri committed Feb 26, 2018
1 parent a4819ad commit 0712239
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,10 @@ public void onFailure(Response response, Throwable t, JSONObject extendedInfo) {


private void processInAppMessages(JSONArray inAppMsgList){
messageList.clear();
if(inAppMsgList!=null) {
try {
if (null != inAppMsgList && inAppMsgList.length() > 0) {
messageList.clear();
for (int inappIndex = 0; inappIndex < inAppMsgList.length(); inappIndex++) {
JSONObject inappMessage = inAppMsgList.getJSONObject(inappIndex);
String layout = inappMessage.getString("layout");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,13 @@ private static int getOSVersion() {

private static String getPlatform() {
// return Locale.getDefault().getLanguage();
return "android";
return "G";
}

public static JSONObject getInitJson(Application application) {
JSONObject initObject = new JSONObject();
try {
// initObject.put("model", getModel());
// initObject.put("brand", getBrand());
// initObject.put("OSVersion", getOSVersion());
initObject.put("platform", getPlatform());
// initObject.put("appId", getPackageName(application));
// initObject.put("appVersion", "1.0.0");
// initObject.put("appName", getAppName(application));
} catch (JSONException e) {
initObject = null;
logger.error("Error creating init json " + e.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ private void inializeAppLaunch(){
// AppLaunch.getInstance().initApp(getApplication(), BMSClient.REGION_US_SOUTH,"85720163-c9ca-4969-953e-9ef998464082","a9e5ad89-776d-4038-9c8a-ffd8734dcd15");
// AppLaunch.getInstance().initApp(getApplication(), BMSClient.REGION_US_SOUTH,"e134b9c0-7349-4a5f-b27a-278efa5c58d7","27a69ad4-bec9-4141-85c8-a4b37c0ef905");

AppLaunchConfig appLaunchConfig = new AppLaunchConfig.Builder().eventFlushInterval(10).cacheExpiration(1).fetchPolicy(RefreshPolicy.BACKGROUND_REFRESH).deviceId("f88ky8u").build();
AppLaunchConfig appLaunchConfig = new AppLaunchConfig.Builder().eventFlushInterval(10).cacheExpiration(1).fetchPolicy(RefreshPolicy.REFRESH_ON_EVERY_START).deviceId("asdfdasf").build();
AppLaunchUser appLaunchUser = new AppLaunchUser.Builder().userId("norton").custom("test","newtest").build();
// AppLaunchUser appLaunchUser = new AppLaunchUser.Builder().userId("norton").build();
// AppLaunch.getInstance().init(getApplication(), ICRegion.US_SOUTH_STAGING,"852301c1-128e-4b11-80f5-9d113cdb976f","ecf53cdf-40ca-4239-9c49-15cdd88a36e7",appLaunchConfig,appLaunchUser,this);
AppLaunch.getInstance().initialize(getApplication(), ICRegion.US_SOUTH,"d28481fc-948b-44ff-9e75-e637fa3fbaf3","6e113b79-cbfe-458d-8fd8-4840547b3241",appLaunchConfig,appLaunchUser,this);
AppLaunch.getInstance().initialize(getApplication(), ICRegion.US_SOUTH,"e5fa93b0-4d0a-4e17-bc91-1189091a9341","e58862fb-9074-4506-a16d-333c3ab5fabb",appLaunchConfig,appLaunchUser,this);



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public void onClick(View v) {
});

try{
if(AppLaunch.getInstance().isFeatureEnabled("_j98xjn74z")){
String value = AppLaunch.getInstance().getPropertyOfFeature("_j98xjn74z","_1pgqug4y5");
if(AppLaunch.getInstance().isFeatureEnabled("_u9u6kkwud")){
String value = AppLaunch.getInstance().getPropertyOfFeature("_u9u6kkwud","_efggnarpr");
if(Boolean.valueOf(value)){
runOnUiThread(new Runnable() {
@Override
Expand All @@ -73,8 +73,8 @@ public void run() {

public void onFeaturesReceived(String features) {
try{
if(AppLaunch.getInstance().isFeatureEnabled("_j98xjn74z")){
String value = AppLaunch.getInstance().getPropertyOfFeature("_j98xjn74z","_1pgqug4y5");
if(AppLaunch.getInstance().isFeatureEnabled("_u9u6kkwud")){
String value = AppLaunch.getInstance().getPropertyOfFeature("_u9u6kkwud","_efggnarpr");
if(Boolean.valueOf(value)){
runOnUiThread(new Runnable() {
@Override
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ To install Applaunch Android SDK using jitpack

```
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
```

Expand Down Expand Up @@ -149,7 +148,7 @@ The AppLaunchUser builder is used to provide the following information:
##### 3. Initialize App Launch SDK

```
AppLaunch.getInstance().init(getApplication(), "bluemixRegionSuffix","appGUID","clientSecret",appLaunchConfig,appLaunchUser,AppLaunchListener);
AppLaunch.getInstance().initialize(getApplication(), "bluemixRegionSuffix","appGUID","clientSecret",appLaunchConfig,appLaunchUser,AppLaunchListener);
```

Where `region` parameter specifies the location where the app is hosted. You can use any of the following values:
Expand Down

0 comments on commit 0712239

Please sign in to comment.