Permalink
Browse files

AndroidInfoModule now also returns Android ID

Summary: Added Android ID as one of the constants returned by AndroidInfoModule

Reviewed By: fkgozali

Differential Revision: D7206029

fbshipit-source-id: 110b33235d3023b4a4607d37acc3440cfe735cef
  • Loading branch information...
L33tcodex0r authored and facebook-github-bot committed Mar 9, 2018
1 parent 25b8ec8 commit 216c8ec04b22704f722ecaac4718157af4434a0c
@@ -10,6 +10,7 @@
import android.app.UiModeManager;
import android.content.res.Configuration;
import android.os.Build;
import android.provider.Settings.Secure;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
@@ -72,6 +73,7 @@ public String getName() {
constants.put("isTesting", "true".equals(System.getProperty(IS_TESTING)));
constants.put("reactNativeVersion", ReactNativeVersion.VERSION);
constants.put("uiMode", uiMode());
constants.put("androidID", Secure.getString(getReactApplicationContext().getContentResolver(), Secure.ANDROID_ID));
return constants;
}
}

0 comments on commit 216c8ec

Please sign in to comment.