@@ -75,8 +75,18 @@ android:id="@+id/my_id"
75
75
android:layout_height=" wrap_content"
76
76
android:layout_width=" wrap_content"
77
77
android:text=" My Yoti Button"
78
- yoti:useCaseId=" YOUR_USE_CASE_ID" />
78
+ yoti:useCaseId=" YOUR_USE_CASE_ID"
79
+ yoti:buttonTheme=" <Theme_Yoti | Theme_EasyId | Theme_Partnership>" />
79
80
```
81
+
82
+ In case ``` yoti:buttonTheme ``` is not provided, then ``` Theme_Partnership ``` is considered as a default theme.
83
+
84
+ When the theme is applied as ``` Theme_Yoti ``` or ``` Theme_Partnership ```
85
+ * User can share attribute either through Yoti or EasyId app
86
+
87
+ When the theme is applied as ``` Theme_EasyId ```
88
+ * User can share attribute only through EasyId app
89
+
80
90
[ See this code in one of our sample apps] ( ./sample-app/src/main/res/layout/activity_main.xml )
81
91
82
92
Alternatively, you can set the button's useCaseId with:
@@ -198,7 +208,7 @@ yotiSDKButton.setOnYotiButtonListener(new YotiSDKButton.OnYotiButtonClickListene
198
208
There is also a listener that you can set to be notified when the intent has been sent to the Yoti app.
199
209
When this happens you would probably want to restore your state.
200
210
201
-
211
+ Attention: This listener is now deprecated.
202
212
``` java
203
213
yotiSDKButton. setOnYotiCalledListener(new YotiSDKButton .OnYotiCalledListener () {
204
214
@Override
@@ -207,6 +217,16 @@ When this happens you would probably want to restore your state.
207
217
}
208
218
});
209
219
```
220
+ Please use the below listener to get notified when the intent has been sent to app based on the specified theme:
221
+ ``` java
222
+ yotiSDKButton. setOnAppCalledListener(new YotiSDKButton .OnAppCalledListener () {
223
+ @Override
224
+ public void onAppCalled () {
225
+ // Restore the original state
226
+ }
227
+ });
228
+ ```
229
+
210
230
[ See this code in one of our sample apps] ( ./sample-app/src/main/java/com/yoti/mobile/android/sdk/sampleapp/MainActivity.java )
211
231
212
232
You can activate a verbose mode for the SDK by using this method :
@@ -218,6 +238,7 @@ If the Yoti app is not installed in the user's phone by default the SDK will sen
218
238
open a website that invites the user to download the Yoti app.
219
239
Alternatively, an error listener can be set up so you can deal with this situation by yourself.
220
240
241
+ Attention: This listener is now deprecated.
221
242
``` java
222
243
yotiSDKButton. setOnYotiAppNotInstalledListener(new YotiSDKButton .OnYotiAppNotInstalledListener () {
223
244
@Override
@@ -226,6 +247,17 @@ Alternatively, an error listener can be set up so you can deal with this situati
226
247
}
227
248
});
228
249
```
250
+ Please use the below listener to determine whether the Yoti/EasyId app is not installed:
251
+ ``` java
252
+ mYotiSDKButton. setOnAppNotInstalledListener(new OnAppNotInstalledListener () {
253
+ @Override
254
+ public void onAppNotInstalled (final YotiSDKAppNotInstalledException cause , final String appURL ) {
255
+ // The exception will provide info on which app is not installed
256
+ // appURL is the app's play store URL, launch the browser intent to allow user to download the app and proceed
257
+ }
258
+ });
259
+ ```
260
+ [ See this code in one of our sample apps] ( ./sample-app/src/main/java/com/yoti/mobile/android/sdk/sampleapp/MainActivity.java )
229
261
230
262
## Running the Example
231
263
0 commit comments