From 216c8ec04b22704f722ecaac4718157af4434a0c Mon Sep 17 00:00:00 2001 From: Alexander Tu Date: Fri, 9 Mar 2018 11:57:08 -0800 Subject: [PATCH] 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 --- .../facebook/react/modules/systeminfo/AndroidInfoModule.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoModule.java index 1037d4c5e..bc62a544f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoModule.java @@ -10,6 +10,7 @@ package com.facebook.react.modules.systeminfo; 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 class AndroidInfoModule extends ReactContextBaseJavaModule { 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; } }