File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 110110 <category android : name =" android.intent.category.BROWSABLE" />
111111
112112 <data
113- android : host =" cash.getcode.com "
113+ android : host =" @string/root_url_cash_no_protocol "
114114 android : pathPattern =" /cash/.*"
115115 android : scheme =" https" />
116116 </intent-filter >
127127 android : pathPattern =" /c/.*"
128128 android : scheme =" https" />
129129 </intent-filter >
130+
131+ <intent-filter >
132+ <action android : name =" android.intent.action.VIEW" />
133+
134+ <category android : name =" android.intent.category.DEFAULT" />
135+ <category android : name =" android.intent.category.BROWSABLE" />
136+
137+ <data
138+ android : host =" jump.getcode.com"
139+ android : scheme =" https" />
140+ </intent-filter >
141+
130142 <intent-filter >
131143 <action android : name =" android.intent.action.VIEW" />
132144
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import android.net.Uri
66import android.os.Parcelable
77import androidx.core.net.toUri
88import cafe.adriel.voyager.core.screen.Screen
9+ import com.getcode.R
910import com.getcode.model.PrefsBool
1011import com.getcode.models.DeepLinkRequest
1112import com.getcode.navigation.screens.ScanScreen
@@ -55,7 +56,7 @@ class DeeplinkHandler @Inject constructor(
5556
5657 suspend fun handle (intent : Intent ? = debounceIntent): DeeplinkResult ? {
5758 println (intent)
58- val uri = when {
59+ var uri = when {
5960 intent?.data != null -> intent.data
6061 intent?.getStringExtra(Intent .EXTRA_TEXT ) != null -> {
6162 val sharedLink = intent.getStringExtra(Intent .EXTRA_TEXT )?.toUri() ? : return null
@@ -68,6 +69,14 @@ class DeeplinkHandler @Inject constructor(
6869 else -> null
6970 } ? : return null
7071
72+ // check for jump
73+ if (uri.host == context.getString(R .string.root_url_jump_no_protocol)) {
74+ val source = uri.getQueryParameter(" source" )
75+ if (source != null ) {
76+ uri = Uri .parse(source)
77+ }
78+ }
79+
7180 return when (val type = uri.deeplinkType) {
7281 is Type .Login -> {
7382 DeeplinkResult (
Original file line number Diff line number Diff line change 99 <string translatable =" false" name =" root_url_cash" >https://cash.getcode.com</string >
1010 <string translatable =" false" name =" app_url_cash" >codewallet://cash.getcode.com</string >
1111 <string translatable =" false" name =" root_url_app_no_protocol" >app.getcode.com</string >
12+ <string translatable =" false" name =" root_url_jump_no_protocol" >jump.getcode.com</string >
1213 <string translatable =" false" name =" root_url_cash_no_protocol" >cash.getcode.com</string >
1314 <string translatable =" false" name =" root_url_sdk_no_protocol" >sdk.getcode.com</string >
1415 <string translatable =" false" name =" root_url_tipcard_no_protocol" >tipcard.getcode.com</string >
You can’t perform that action at this time.
0 commit comments