Skip to content

Commit

Permalink
AndroidInfoModule now also returns Android ID
Browse files Browse the repository at this point in the history
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 216c8ec
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.