Skip to content

Commit 216c8ec

Browse files
L33tcodex0rfacebook-github-bot
authored andcommitted
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
1 parent 25b8ec8 commit 216c8ec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoModule.java

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import android.app.UiModeManager;
1111
import android.content.res.Configuration;
1212
import android.os.Build;
13+
import android.provider.Settings.Secure;
1314

1415
import com.facebook.react.bridge.ReactApplicationContext;
1516
import com.facebook.react.bridge.ReactContextBaseJavaModule;
@@ -72,6 +73,7 @@ public String getName() {
7273
constants.put("isTesting", "true".equals(System.getProperty(IS_TESTING)));
7374
constants.put("reactNativeVersion", ReactNativeVersion.VERSION);
7475
constants.put("uiMode", uiMode());
76+
constants.put("androidID", Secure.getString(getReactApplicationContext().getContentResolver(), Secure.ANDROID_ID));
7577
return constants;
7678
}
7779
}

0 commit comments

Comments
 (0)