diff --git a/android/src/main/java/com/robinpowered/RNMDMManager/RNMobileDeviceManagerModule.java b/android/src/main/java/com/robinpowered/RNMDMManager/RNMobileDeviceManagerModule.java index 8dbb617..c38234e 100644 --- a/android/src/main/java/com/robinpowered/RNMDMManager/RNMobileDeviceManagerModule.java +++ b/android/src/main/java/com/robinpowered/RNMDMManager/RNMobileDeviceManagerModule.java @@ -160,7 +160,17 @@ public void getConfiguration(final Promise promise) { Bundle appRestrictions = restrictionsManager.getApplicationRestrictions(); WritableNativeMap data = new WritableNativeMap(); for (String key : appRestrictions.keySet()){ - data.putString(key, appRestrictions.getString(key)); + Object value = appRestrictions.get(key); + + if (value instanceof Boolean) { + data.putBoolean(key, (Boolean) value); + } else if (value instanceof Integer) { + data.putInt(key, (Integer) value); + } else if (value instanceof String) { + data.putString(key, (String) value); + } else { + data.putString(key, value.toString()); + } } promise.resolve(data); } else {