mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-03 14:40:54 +00:00
Enable identifyUser
APIs in android
This commit is contained in:
parent
1814b37b85
commit
712016c164
@ -320,6 +320,22 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
|
|||||||
return tags;
|
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...)}
|
* Reset ALL tags added using {@link #addTags(String...)}
|
||||||
*/
|
*/
|
||||||
|
2
index.js
2
index.js
@ -437,6 +437,8 @@ module.exports = {
|
|||||||
identifyUserWithEmail: function (email, name) {
|
identifyUserWithEmail: function (email, name) {
|
||||||
if (Platform.OS == 'ios') {
|
if (Platform.OS == 'ios') {
|
||||||
Instabug.identifyUserWithEmail(email, name);
|
Instabug.identifyUserWithEmail(email, name);
|
||||||
|
} else if ('android') {
|
||||||
|
Instabug.identifyUser(name, email);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user