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 коммит произвёл Facebook Github Bot
Родитель 7e9242bd1a
Коммит 1c3f6acfe5
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -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);