Skip to content

Commit

Permalink
[FIX] SDK Methods and API request.
Browse files Browse the repository at this point in the history
  • Loading branch information
renesansz committed Jan 29, 2016
1 parent 9f2df41 commit 3acdbc6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/android/io/branch/BranchSDK.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ private void initSession()

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

this.activity = this.cordova.getActivity();
this.instance = Branch.getAutoInstance(this.activity.getApplicationContext());
this.instance.initSession(new SessionListener(), activity.getIntent().getData(), activity);
this.callbackContext.success("Success");

Expand Down Expand Up @@ -528,11 +526,11 @@ private void setDebug(boolean isEnable)

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

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

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

}
Expand Down Expand Up @@ -685,7 +683,7 @@ public void onLinkCreate(String url, BranchError error) {
Log.d(LCAT, "link to share: " + url);

try {
response.put("generatedLink", url);
response.put("url", url);
} catch (JSONException e) {
e.printStackTrace();
return;
Expand Down

0 comments on commit 3acdbc6

Please sign in to comment.