Skip to content

Commit

Permalink
[FIX] initSession() return and updated autoInstance call
Browse files Browse the repository at this point in the history
  • Loading branch information
renesansz committed Feb 1, 2016
1 parent b375c62 commit 182a7fc
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/android/io/branch/BranchSDK.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ static class BranchLinkProperties extends io.branch.referral.util.LinkProperties
*/
public void onNewIntent(Intent intent)
{

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

this.setDebug(true);
}

/**
Expand All @@ -56,15 +55,10 @@ public void onNewIntent(Intent intent)
* @param multitasking A {@link boolean} flag indicating if multitasking is turned on for app
*/
@Override
public void onResume(boolean multitasking)
{
public void onResume(boolean multitasking) {

Log.d(LCAT, "SDK On Resume");

if (this.instance != null) {
initSession();
}

}

/**
Expand Down Expand Up @@ -171,7 +165,7 @@ private void initSession()
Log.d(LCAT, "start initSession()");

this.instance.initSession(new SessionListener(), activity.getIntent().getData(), activity);
this.callbackContext.success("Success");


}

Expand Down Expand Up @@ -527,7 +521,7 @@ private void setDebug(boolean isEnable)
Log.d(LCAT, "start setDebug()");

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

if (isEnable) {
this.instance.setDebug();
Expand Down

0 comments on commit 182a7fc

Please sign in to comment.