Add mapping for getUserAttribute API

This commit is contained in:
Hossam Hassan
2017-02-03 20:33:00 +02:00
parent 5ecfa5612e
commit 4d61214abc
2 changed files with 29 additions and 0 deletions
@@ -548,6 +548,22 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
}
}
/**
* Gets specific user attribute.
*
* @param key the attribute key as string
* @return the desired user attribute
*/
@ReactMethod
public static String getUserAttribute(String key) {
try {
return mInstabug.getUserAttribute(key);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
private Locale getLocaleByKey(String instabugLocale) {
String localeInLowerCase = instabugLocale.toLowerCase();
switch (localeInLowerCase) {