Last active
October 12, 2015 03:38
-
-
Save henrytao-me/295fd16ae2bacc698eea to your computer and use it in GitHub Desktop.
branch.io implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta-data | |
android:name="io.branch.sdk.TestMode" | |
android:value="true" /> | |
<meta-data | |
android:name="io.branch.sdk.BranchKey.test" | |
android:value="key_test_..." /> | |
<meta-data | |
android:name="io.branch.sdk.BranchKey" | |
android:value="key_live_..." /> | |
<activity | |
android:alwaysRetainTaskState="true" | |
android:label="@string/app_name" | |
android:name="com.squar.mychat.app.activity.MainActivity" | |
android:launchMode="singleTask" | |
android:theme="@style/MdAppTheme.Login"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
<intent-filter> | |
<action android:name="android.intent.action.VIEW" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<category android:name="android.intent.category.BROWSABLE" /> | |
<data | |
android:host="open" | |
android:scheme="mychat" /> | |
<data | |
android:host="bnc.lt" | |
android:scheme="https" /> | |
</intent-filter> | |
</activity> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onCreate() { | |
super.onCreate(); | |
Branch.getAutoInstance(this); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Branch branch = Branch.getInstance(); | |
branch.initSession((referringParams, error) -> { | |
if (error == null) { | |
Ln.i(String.format("custom | %s", referringParams.toString())); | |
} else { | |
Ln.e(error); | |
} | |
}, this.getIntent().getData(), this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment