Enable identifyUser APIs in android

This commit is contained in:
DevHossamHassan 2017-06-20 00:12:26 +02:00
parent 1814b37b85
commit 712016c164
2 changed files with 18 additions and 0 deletions

View File

@ -320,6 +320,22 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
return tags;
}
/**
* Set the user identity.
* Instabug will pre-fill the user email in reports.
*
* @param username Username.
* @param email User's default email
*/
@ReactMethod
public void identifyUser(String userName, String userEmail) {
try {
mInstabug.identifyUser(userName, userEmail);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Reset ALL tags added using {@link #addTags(String...)}
*/

View File

@ -437,6 +437,8 @@ module.exports = {
identifyUserWithEmail: function (email, name) {
if (Platform.OS == 'ios') {
Instabug.identifyUserWithEmail(email, name);
} else if ('android') {
Instabug.identifyUser(name, email);
}
},