Expose more android device infos

Reviewed By: fkgozali

Differential Revision: D6692907

fbshipit-source-id: ecbcf763aae2035c9526e891d0cc14a987b6d4c1
This commit is contained in:
Emil Sjölander 2018-01-11 04:13:07 -08:00 committed by Facebook Github Bot
parent 7e9242bd1a
commit 1c3f6acfe5
1 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,10 @@ public class AndroidInfoModule extends BaseJavaModule {
public @Nullable Map<String, Object> getConstants() {
HashMap<String, Object> constants = new HashMap<>();
constants.put("Version", Build.VERSION.SDK_INT);
constants.put("Release", Build.VERSION.RELEASE);
constants.put("Serial", Build.SERIAL);
constants.put("Fingerprint", Build.FINGERPRINT);
constants.put("Model", Build.MODEL);
constants.put("ServerHost", AndroidInfoHelpers.getServerHost());
constants.put("isTesting", "true".equals(System.getProperty(IS_TESTING)));
constants.put("reactNativeVersion", ReactNativeVersion.VERSION);