11
11
12
12
import com .yoti .mobile .android .sdk .YotiSDKButton ;
13
13
import com .yoti .mobile .android .sdk .exceptions .YotiSDKException ;
14
- import com .yoti .mobile .android .sdk .exceptions .YotiSDKNoYotiAppException ;
15
14
16
15
public class MainActivity extends AppCompatActivity {
17
16
@@ -47,14 +46,11 @@ public void onStartScenarioError(YotiSDKException cause) {
47
46
}
48
47
});
49
48
50
- mYotiSDKButton .setOnYotiAppNotInstalledListener (new YotiSDKButton .OnYotiAppNotInstalledListener () {
51
- @ Override
52
- public void onYotiAppNotInstalledError (YotiSDKNoYotiAppException cause ) {
53
- //The Yoti app is not installed, let's deal with it
54
- mYotiSDKButton .setVisibility (View .VISIBLE );
55
- mProgress .setVisibility (View .GONE );
56
- mMessage .setText (R .string .loc_no_yoti_app_error );
57
- }
49
+ mYotiSDKButton .setOnAppNotInstalledListener ((cause , appURL ) -> {
50
+ // App is not installed, need to call browser intent with app download link
51
+ mYotiSDKButton .setVisibility (View .VISIBLE );
52
+ mProgress .setVisibility (View .GONE );
53
+ launchAppUrl (appURL );
58
54
});
59
55
60
56
mYotiSDKButton .setOnAppCalledListener (new YotiSDKButton .OnAppCalledListener () {
@@ -65,13 +61,6 @@ public void onAppCalled() {
65
61
mProgress .setVisibility (View .GONE );
66
62
}
67
63
});
68
-
69
- mYotiSDKButton .setOnAppNotInstalledListener ((cause , appURL ) -> {
70
- // App is not installed, need to call browser intent with app download link
71
- mYotiSDKButton .setVisibility (View .VISIBLE );
72
- mProgress .setVisibility (View .GONE );
73
- launchAppUrl (appURL );
74
- });
75
64
}
76
65
77
66
// required app is not installed, launch app url to download the app
0 commit comments