File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
yoti-sdk/src/main/java/com/yoti/mobile/android/sdk/kernelSDK Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 17
17
import java .security .NoSuchAlgorithmException ;
18
18
import java .security .cert .CertificateException ;
19
19
20
+ import static com .yoti .mobile .android .sdk .YotiAppDefs .YOTI_APP_PACKAGE ;
20
21
import static com .yoti .mobile .android .sdk .YotiSDKDefs .APP_ID_PARAM ;
21
22
import static com .yoti .mobile .android .sdk .YotiSDKDefs .APP_NAME_PARAM ;
22
23
import static com .yoti .mobile .android .sdk .YotiSDKDefs .CALLBACK_PARAM ;
@@ -123,7 +124,16 @@ private void handleActionStartScenario(String useCaseId) {
123
124
.appendQueryParameter (APP_NAME_PARAM , appName )
124
125
.build ();
125
126
126
- Intent intent = new Intent (Intent .ACTION_VIEW , uri );
127
+ Intent intent ;
128
+ intent = getPackageManager ().getLaunchIntentForPackage (YOTI_APP_PACKAGE );
129
+
130
+ if (intent == null ) {
131
+ // Yoti app is not installed, let's open the website
132
+ intent = new Intent (Intent .ACTION_VIEW , uri );
133
+ } else {
134
+ intent .setData (uri );
135
+ }
136
+
127
137
intent .addFlags (Intent .FLAG_ACTIVITY_NEW_TASK );
128
138
startActivity (intent );
129
139
}
You can’t perform that action at this time.
0 commit comments