Commit 1b28779a authored by zxcpoiu's avatar zxcpoiu

add getBrand() on both android and ios

parent 2ebefdda
...@@ -159,6 +159,7 @@ RCT_EXPORT_MODULE() ...@@ -159,6 +159,7 @@ RCT_EXPORT_MODULE()
@"systemName": currentDevice.systemName, @"systemName": currentDevice.systemName,
@"systemVersion": currentDevice.systemVersion, @"systemVersion": currentDevice.systemVersion,
@"model": self.deviceName, @"model": self.deviceName,
@"brand": @"Apple",
@"deviceId": self.deviceId, @"deviceId": self.deviceId,
@"deviceName": currentDevice.name, @"deviceName": currentDevice.name,
@"deviceLocale": self.deviceLocale, @"deviceLocale": self.deviceLocale,
......
...@@ -85,6 +85,7 @@ public class RNDeviceModule extends ReactContextBaseJavaModule { ...@@ -85,6 +85,7 @@ public class RNDeviceModule extends ReactContextBaseJavaModule {
constants.put("systemName", "Android"); constants.put("systemName", "Android");
constants.put("systemVersion", Build.VERSION.RELEASE); constants.put("systemVersion", Build.VERSION.RELEASE);
constants.put("model", Build.MODEL); constants.put("model", Build.MODEL);
constants.put("brand", Build.BRAND);
constants.put("deviceId", Build.BOARD); constants.put("deviceId", Build.BOARD);
constants.put("deviceLocale", this.getCurrentLanguage()); constants.put("deviceLocale", this.getCurrentLanguage());
constants.put("deviceCountry", this.getCurrentCountry()); constants.put("deviceCountry", this.getCurrentCountry());
......
...@@ -20,6 +20,9 @@ module.exports = { ...@@ -20,6 +20,9 @@ module.exports = {
getModel: function () { getModel: function () {
return RNDeviceInfo.model; return RNDeviceInfo.model;
}, },
getBrand: function () {
return RNDeviceInfo.brand;
},
getSystemName: function () { getSystemName: function () {
return RNDeviceInfo.systemName; return RNDeviceInfo.systemName;
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment