diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java index 99b0ae3..163d0d0 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java @@ -579,6 +579,16 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { } } + /** + * Gets all saved user attributes. + * + * @return all user attributes as HashMap + */ + @ReactMethod + public HashMap getAllUserAttributes() { + return mInstabug.getAllUserAttributes(); + } + private Locale getLocaleByKey(String instabugLocale) { String localeInLowerCase = instabugLocale.toLowerCase(); switch (localeInLowerCase) { diff --git a/index.js b/index.js index a620b11..713b9b7 100644 --- a/index.js +++ b/index.js @@ -664,6 +664,17 @@ module.exports = { } }, + /** + * Gets all saved user attributes. + * + * @return all user attributes as HashMap + */ + getAllUserAttributes(){ + if (Platform.OS === 'android') { + return Instabug.getAllUserAttributes(); + } + }, + /** * The event used to invoke the feedback form * @readonly