Skip to content

Commit

Permalink
[FIX] Android SKD Initialize method.
Browse files Browse the repository at this point in the history
  • Loading branch information
renesansz committed Feb 20, 2016
1 parent 3009c45 commit 3df1c8e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ SOFTWARE.
<meta-data android:name="io.branch.sdk.BranchKey" android:value="$BRANCH_LIVE_KEY" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
<intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
Expand Down
7 changes: 5 additions & 2 deletions src/android/io/branch/BranchSDK.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ private void initSession()

Log.d(LCAT, "start initSession()");

this.instance = Branch.getAutoInstance(this.activity.getApplicationContext());
this.instance.initSession(new SessionListener(), activity.getIntent().getData(), activity);


Expand Down Expand Up @@ -529,10 +530,12 @@ private void setDebug(boolean isEnable)
Log.d(LCAT, "start setDebug()");

this.activity = this.cordova.getActivity();
this.instance = Branch.getAutoInstance(this.activity.getApplicationContext());


Branch debugInstance = Branch.getAutoInstance(this.activity.getApplicationContext());

if (isEnable) {
this.instance.setDebug();
debugInstance.setDebug();
}

}
Expand Down
2 changes: 1 addition & 1 deletion testbed/init.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
cordova platform add ios android
cordova plugin add ../ --link --variable BRANCH_LIVE_KEY=key_live_fnmRM1FXtu11t6e4LU8WsldpvDcA0bzv --variable APP_NAME=testbed --variable ENCODED_ID=X9Ug
cordova plugin add ../ --link --variable BRANCH_LIVE_KEY=key_live_fnmRM1FXtu11t6e4LU8WsldpvDcA0bzv --variable URI_SCHEME=testbed --variable ENCODED_ID=X9Ug

0 comments on commit 3df1c8e

Please sign in to comment.