Add mapping for setUserAttribute API

This commit is contained in:
Hossam Hassan
2017-02-03 19:47:26 +02:00
parent 527394412d
commit 5ecfa5612e
2 changed files with 28 additions and 0 deletions
@@ -533,6 +533,21 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
}
}
/**
* Sets user attribute to overwrite it's value or create a new one if it doesn't exist.
*
* @param key the attribute
* @param value the value
*/
@ReactMethod
public static void setUserAttribute(String key, String value) {
try {
mInstabug.setUserAttribute(key, value);
} catch (Exception e) {
e.printStackTrace();
}
}
private Locale getLocaleByKey(String instabugLocale) {
String localeInLowerCase = instabugLocale.toLowerCase();
switch (localeInLowerCase) {