Commit f7226362 authored by pablo.mint's avatar pablo.mint

Add android-only getAPILevel method

Had to bump the method table by a few spaces as well... sorry
parent 50357ab7
This diff is collapsed.
......@@ -187,6 +187,7 @@ RCT_EXPORT_MODULE()
return @{
@"systemName": currentDevice.systemName,
@"systemVersion": currentDevice.systemVersion,
@"apiLevel": @"not available",
@"model": self.deviceName,
@"brand": @"Apple",
@"deviceId": self.deviceId,
......
......@@ -121,6 +121,7 @@ public class RNDeviceModule extends ReactContextBaseJavaModule {
constants.put("model", Build.MODEL);
constants.put("brand", Build.BRAND);
constants.put("deviceId", Build.BOARD);
constants.put("apiLevel", Build.VERSION.SDK_INT);
constants.put("deviceLocale", this.getCurrentLanguage());
constants.put("deviceCountry", this.getCurrentCountry());
constants.put("uniqueId", Secure.getString(this.reactContext.getContentResolver(), Secure.ANDROID_ID));
......
......@@ -29,6 +29,9 @@ module.exports = {
getSystemVersion: function () {
return RNDeviceInfo.systemVersion;
},
getAPILevel: function () {
return RNDeviceInfo.apiLevel;
},
getBundleId: function() {
return RNDeviceInfo.bundleId;
},
......
......@@ -99,6 +99,7 @@ namespace RNDeviceInfo
constants["deviceName"] = deviceName;
constants["systemName"] = "Windows";
constants["systemVersion"] = osVersion;
constants["apiLevel"] = "not available";
constants["model"] = model;
constants["brand"] = model;
constants["deviceId"] = hardwareVersion;
......
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