Skip to content

Commit 97a7341

Browse files
authored
Merge pull request #6 from BranchMetrics/ENGMT-2400
[patch] ENGMT-2400: Sets up link shortener demo app
1 parent c035c05 commit 97a7341

File tree

7 files changed

+56
-10
lines changed

7 files changed

+56
-10
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ android {
1212
applicationId = "io.branch.branchlinksimulator"
1313
minSdk = 26
1414
targetSdk = 34
15-
versionCode = 23
16-
versionName = "2.3"
15+
versionCode = 24
16+
versionName = "2.4"
1717

1818
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1919
vectorDrawables {

app/release/app-release.aab

-5.51 MB
Binary file not shown.

app/release/app-release.apk

-5.56 MB
Binary file not shown.

app/release/output-metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"type": "SINGLE",
1212
"filters": [],
1313
"attributes": [],
14-
"versionCode": 14,
15-
"versionName": "1.4",
14+
"versionCode": 24,
15+
"versionName": "2.4",
1616
"outputFile": "app-release.apk"
1717
}
1818
],

app/src/main/AndroidManifest.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@
5454
<data android:scheme="https" android:host="prod-freedom-alternate.test-app.link" />
5555
</intent-filter>
5656

57+
<!-- Live Prod Link Shortener App -->
58+
<intent-filter android:autoVerify="true">
59+
<action android:name="android.intent.action.VIEW" />
60+
<category android:name="android.intent.category.DEFAULT" />
61+
<category android:name="android.intent.category.BROWSABLE" />
62+
<data android:scheme="https" android:host="hop.link" />
63+
<data android:scheme="https" android:host="r3dfg.app.link" />
64+
<data android:scheme="https" android:host="r3dfg-alternate.app.link" />
65+
</intent-filter>
66+
5767
<!-- Live Prod AC App -->
5868
<intent-filter android:autoVerify="true">
5969
<action android:name="android.intent.action.VIEW" />
@@ -91,6 +101,16 @@
91101
<data android:scheme="https" android:host="stage-freedom-alternate.test-branchbeta.link" />
92102
</intent-filter>
93103

104+
<!-- Live Stage Link Shortener App -->
105+
<intent-filter android:autoVerify="true">
106+
<action android:name="android.intent.action.VIEW" />
107+
<category android:name="android.intent.category.DEFAULT" />
108+
<category android:name="android.intent.category.BROWSABLE" />
109+
<data android:scheme="https" android:host="hoplink.branchcustom.xyz" />
110+
<data android:scheme="https" android:host="skhsg.branchbeta.link" />
111+
<data android:scheme="https" android:host="skhsg-alternate.branchbeta.link" />
112+
</intent-filter>
113+
94114
<!-- Live Stage AC App -->
95115
<intent-filter android:autoVerify="true">
96116
<action android:name="android.intent.action.VIEW" />

app/src/main/java/io/branch/branchlinksimulator/ApiConfiguration.kt

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@ data class ApiConfiguration(
77
val staging: Boolean
88
)
99

10-
const val STAGING = "Staging"
11-
const val PRODUCTION = "Production"
12-
const val STAGING_AC = "Staging AC"
13-
const val PRODUCTION_AC = "Production AC"
10+
const val STAGING = "[Stage] External Services"
11+
const val PRODUCTION = "Pro Production"
12+
const val STAGING_AC = "[Stage] Adv. Compliance Sandbox"
13+
const val PRODUCTION_AC = "Adv. Compliance Sandbox"
14+
const val STAGING_LS = "[Stage] LS + ENGMT Ess. Demo"
15+
const val PRODUCTION_LS = "LS + ENGMT Ess. Demo"
1416

1517
val apiConfigurationsMap: Map<String, ApiConfiguration> = mapOf(
18+
STAGING_LS to ApiConfiguration(
19+
branchKey = "key_live_nFc30jPoTV53LhvHat5XXffntufA4O0l",
20+
apiUrl = "https://api.stage.branch.io/",
21+
appId = "1425582272655938028",
22+
staging = true
23+
),
1624
STAGING_AC to ApiConfiguration(
1725
branchKey = "key_live_juoZrlpzQZvBQbwR33GO5hicszlTGnVT",
1826
apiUrl = "https://protected-api.stage.branch.io/",
@@ -25,16 +33,22 @@ val apiConfigurationsMap: Map<String, ApiConfiguration> = mapOf(
2533
appId = "436637608899006753",
2634
staging = true
2735
),
36+
PRODUCTION_LS to ApiConfiguration(
37+
branchKey = "key_live_hsdXYiNiH9pfDv50xrFt0gbgEEiMIqFO",
38+
apiUrl = "https://api2.branch.io/",
39+
appId = "1425583205569811094",
40+
staging = false
41+
),
2842
PRODUCTION_AC to ApiConfiguration(
2943
branchKey = "key_live_hshD4wiPK2sSxfkZqkH30ggmyBfmGmD7",
3044
apiUrl = "https://protected-api.branch.io/",
3145
appId = "1284289243903971463",
3246
staging = false
3347
),
3448
PRODUCTION to ApiConfiguration(
35-
branchKey = "key_live_iDiV7ZewvDm9GIYxUnwdFdmmvrc9m3Aw",
49+
branchKey = "key_live_iCh53eMdH5aIibeOqRYBojgpyrmU4gd8",
3650
apiUrl = "https://api2.branch.io/",
37-
appId = "1364964166783226677",
51+
appId = "1425585005551178435",
3852
staging = false
3953
)
4054
)

app/src/main/java/io/branch/branchlinksimulator/ApiSettingsPanel.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ fun ApiSettingsPanel(navController: NavController) {
5959
saveConfig(preferences, it)
6060
})
6161
}
62+
63+
Row(horizontalArrangement = Arrangement.spacedBy(5.dp)) {
64+
ApiButton(configName = STAGING_LS, selectedConfig = selectedConfig, Modifier.weight(1f), onSelect = {
65+
selectedConfig = it
66+
saveConfig(preferences, it)
67+
})
68+
ApiButton(configName = PRODUCTION_LS, selectedConfig = selectedConfig, Modifier.weight(1f), onSelect = {
69+
selectedConfig = it
70+
saveConfig(preferences, it)
71+
})
72+
}
73+
6274
RoundedButton(title = "See Requests", icon = R.drawable.branch_badge_all_white) {
6375
navController.navigate("request")
6476
}

0 commit comments

Comments
 (0)