Skip to content

Commit ee82a06

Browse files
Merge pull request #1 from bboothe-branch/BranchKeyUpdates
Update Branch Keys and URI Scheme
2 parents 9d5987f + dc67a0a commit ee82a06

File tree

2 files changed

+72
-7
lines changed

2 files changed

+72
-7
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,67 @@
11
# branch-Android-sample-test-app
2+
23
Sample Test App for Branch Android SDK
4+
5+
## Purpose
6+
7+
The purpose of this app is to assist developers integrating the Branch Android SDK.
8+
It provides simple use cases that integrate most of the Android Advanced Features found here: https://help.branch.io/developers-hub/docs/android-advanced-features
9+
10+
### *Features Implemented*
11+
- Create a Content Reference
12+
- Create Deep Link
13+
- Share Deep Link
14+
- Read Deep Link
15+
- Create QR Code
16+
- Navigate to Content
17+
- Track Users
18+
- Track Events
19+
- Handle Links in Your Own App
20+
- Set Initialization Metadata
21+
22+
### *How to Route to Content*
23+
1. Build and run the app on your device or emulator
24+
2. Click the share button on the top of the Home Page
25+
3. Send the link to Messages, or copy and paste it into a text editor
26+
4. Click on the Branch Link. The app should open and route to the page it was coded for.
27+
5. (Optional) Test again by modifying link information in the shareBranchLink() function
28+
29+
## Home Page:
30+
31+
- App Creates a Branch Link on App Load at the top of the screen
32+
33+
- Send Branch Purchase Event, Add To Cart Event, and Change Branch Badge Event using the Buttons
34+
35+
- Create a QR Code / Share Branch Link with Navigation Buttons
36+
37+
- Share button creates a link that modifies the color block page
38+
39+
- QR Code button dims screen. Click anywhere on screen to hide QR Code
40+
41+
- Change Branch Badge button changes the badge to a version with opposite colors
42+
43+
## Color Block Page:
44+
45+
- Color block changes based on "color_block_key" parameter
46+
47+
- Options for "color_block_key" parameter are "red", "green", "blue", “yellow”, and “white”
48+
49+
- If one of the above 5 colors aren't selected, color block defaults to white
50+
51+
## Read Deep Link Page:
52+
53+
- Collects session parameters and stores them
54+
55+
- If a Branch link is clicked to open the app, session parameters are modified to match link parameters.
56+
57+
- Collects install parameters on download and stores them
58+
59+
- Page is scrollable in case parameters are too long for the screen
60+
61+
## Limitations
62+
63+
- Code changes are needed to modify link data on QR Code, Share Sheet, and Generated Branch Link
64+
65+
- Install Parameters are difficult to modify
66+
67+
- “+branch_force_new_session” may be confusing to developers on first use

BranchAndroidTestSampleApp/app/src/main/AndroidManifest.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<!-- If utilizing $deeplink_path please explicitly declare your hosts, or utilize a wildcard(*) -->
4949
<data
5050
android:host="open"
51-
android:scheme="androidtestsampleapp" />
51+
android:scheme="branchsampleapp" />
5252

5353
<action android:name="android.intent.action.VIEW" />
5454

@@ -64,11 +64,11 @@
6464
<category android:name="android.intent.category.BROWSABLE" />
6565

6666
<data
67-
android:host="brandonboothe.app.link"
67+
android:host="branchsampleapps.app.link"
6868
android:scheme="https" />
6969
<!-- example-alternate domain is required for App Links when the Journeys/Web SDK and Deepviews are used inside your website. -->
7070
<data
71-
android:host="brandonboothe-alternate.app.link"
71+
android:host="branchsampleapps-alternate.app.link"
7272
android:scheme="https" />
7373
</intent-filter>
7474
<!-- Branch App Links - Test App -->
@@ -79,20 +79,20 @@
7979
<category android:name="android.intent.category.BROWSABLE" />
8080

8181
<data
82-
android:host="brandonboothe.test-app.link"
82+
android:host="branchsampleapps.test-app.link"
8383
android:scheme="https" />
8484
<!-- example-alternate domain is required for App Links when the Journeys/Web SDK and Deepviews are used inside your website. -->
8585
<data
86-
android:host="brandonboothe.test-app.link"
86+
android:host="branchsampleapps-alternate.test-app.link"
8787
android:scheme="https" />
8888
</intent-filter>
8989
</activity> <!-- Branch init -->
9090
<meta-data
9191
android:name="io.branch.sdk.BranchKey"
92-
android:value="key_live_pfXRGHm8v4dqw6tUDF2e3ekctxlbGz8U" />
92+
android:value="key_live_dh1ZXXkeXYQVs5dtp0JaFokptspY4lz5" />
9393
<meta-data
9494
android:name="io.branch.sdk.BranchKey.test"
95-
android:value="key_test_fo4IPGcZy1gDx4qLtz3rpbabrwemRA69" />
95+
android:value="key_test_cm0794ba2WGPEYaAh8G8nhjfxvpZYeNk" />
9696
<meta-data
9797
android:name="io.branch.sdk.TestMode"
9898
android:value="false" />

0 commit comments

Comments
 (0)