File tree 1 file changed +5
-9
lines changed
rampinstantsdk/src/main/java/network/ramp/instantsdk/ui/bank
1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -85,14 +85,8 @@ internal class BankActivity : AppCompatActivity() {
85
85
companion object {
86
86
const val FINISH_RECEIVER = "finish_activity"
87
87
const val INTENT_URL = "url"
88
- val BROWSER_PACKAGE_NAMES = arrayOf(
89
- "com.android.chrome",
90
- "org.mozilla.firefox",
91
- "com.UCMobile.intl",
92
- "com.sec.android.app.sbrowser",
93
- "com.opera.browser",
94
- "com.opera.mini.native",
95
- "com.microsoft.emmx"
88
+ val BANK_HOST_NAMES = arrayOf(
89
+ "verify.monzo.com"
96
90
)
97
91
const val ACTION_VIEW_INTENT = "android.intent.action.VIEW"
98
92
}
@@ -107,11 +101,13 @@ internal class BankActivity : AppCompatActivity() {
107
101
val intent = Intent(ACTION_VIEW_INTENT)
108
102
intent.data = Uri.parse(destinationUrl)
109
103
val activity = intent.resolveActivity(context.packageManager)
110
- if (activity != null && !BROWSER_PACKAGE_NAMES.contains(activity.packageName)) {
104
+ Timber.d("PACKAGE: ${activity.packageName}")
105
+ if (activity != null && BANK_HOST_NAMES.contains(intent.data?.host ?: "no host")) {
111
106
context.startActivity(intent)
112
107
isAppOpened = true
113
108
}
114
109
} catch (ignore: Exception) {
110
+ Timber.d(ignore)
115
111
}
116
112
if (!isAppOpened) {
117
113
Timber.d("isAppOpened : $isAppOpened Load url $destinationUrl")
You can’t perform that action at this time.
0 commit comments