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

Merge pull request #232 from firefueled/get-android-api-level

Add android-only getAPILevel method
parents 50357ab7 f7226362
......@@ -173,6 +173,7 @@ var DeviceInfo = require('react-native-device-info');
| Device ID | `getDeviceId()` | iPhone7,2 | Or the board on Android e.g. goldfish |
| System Name | `getSystemName()` | iPhone OS | |
| System Version | `getSystemVersion()` | 9.0 | |
| API Level | `getAPILevel()` | 25 | ANDROID ONLY - see [API Levels](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)|
| Bundle ID | `getBundleId()` | com.learnium.mobile | |
| Build Number | `getBuildNumber()` | 89 | |
| App Version | `getVersion()` | 1.1.0 | |
......@@ -185,8 +186,8 @@ var DeviceInfo = require('react-native-device-info');
| App Instance ID | `getInstanceID()` | | ANDROID ONLY - see https://developers.google.com/instance-id/ |
| App is running in emulator | `isEmulator()` | true | if app is running in emulator return true |
| App is running on a tablet | `isTablet()` | true | if app is running on a tablet return true |
| PIN or fingerprint set | `isPinOrFingerprintSet()(callback)`| | Only supported in Android and iOS 9.0 and above
| Phone Number | `getPhoneNumber()` | "2348675309" or "" or null | Only supported in Android
| PIN or fingerprint set | `isPinOrFingerprintSet()(callback)`| | Only supported in Android and iOS 9.0 and above |
| Phone Number | `getPhoneNumber()` | "2348675309" or "" or null | Only supported in Android |
| First Install Time | `getFirstInstallTime()` | 1505607068808 | Only supported in Android |
| Last Install Time | `getLastUpdateTime()` | 1505607068808 | Only supported in Android |
......
......@@ -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