Commit ebacfb0c authored by Gant Laborde's avatar Gant Laborde Committed by GitHub

Merge pull request #81 from zxcpoiu/add-brand

add getBrand() on both android and ios
parents 2ebefdda cc8b14e1
...@@ -131,6 +131,8 @@ console.log("Device Unique ID", DeviceInfo.getUniqueID()); // e.g. FCDBD8EF-62F ...@@ -131,6 +131,8 @@ console.log("Device Unique ID", DeviceInfo.getUniqueID()); // e.g. FCDBD8EF-62F
console.log("Device Manufacturer", DeviceInfo.getManufacturer()); // e.g. Apple console.log("Device Manufacturer", DeviceInfo.getManufacturer()); // e.g. Apple
console.log("Device Brand", DeviceInfo.getBrand()); // e.g. Apple / htc / Xiaomi
console.log("Device Model", DeviceInfo.getModel()); // e.g. iPhone 6 console.log("Device Model", DeviceInfo.getModel()); // e.g. iPhone 6
console.log("Device ID", DeviceInfo.getDeviceId()); // e.g. iPhone7,2 / or the board on Android e.g. goldfish console.log("Device ID", DeviceInfo.getDeviceId()); // e.g. iPhone7,2 / or the board on Android e.g. goldfish
......
...@@ -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