Skip to content

Commit

Permalink
Merge pull request #238 from jkimbo/readme-types
Browse files Browse the repository at this point in the history
Update method table with return types
  • Loading branch information
GantMan committed Oct 5, 2017
2 parents ab05398 + 0911ad1 commit dbbe53f
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions README.md
Expand Up @@ -166,33 +166,33 @@ var DeviceInfo = require('react-native-device-info');

| Name | Method | Return | Notes |
| :------------------------- | :------------------------------- | :-------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------- |
| Device Unique ID | `getUniqueID()` | FCDBD8EF-62FC-4ECB-B2F5-92C9E79AC7F9 | This is IDFV on iOS so it will change if all apps from the current apps vendor have been previously uninstalled. |
| Device Manufacturer | `getManufacturer()` | Apple | |
| Device Brand | `getBrand()` | Apple / htc / Xiaomi | |
| Device Model | `getModel()` | iPhone 6 | |
| 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 | |
| App Version (Readable) | `getReadableVersion()` | 1.1.0.89 | |
| Device Name | `getDeviceName()` | Becca's iPhone 6 | |
| User Agent | `getUserAgent()` | Dalvik/2.1.0 (Linux; U; Android 5.1; Google Nexus 4 - 5.1.0 - API 22 - 768x1280 Build/LMY47D) | |
| Device Locale | `getDeviceLocale()` | en-US | |
| Device Country | `getDeviceCountry()` | US | |
| Timezone | `getTimezone()` | America/Mexico_City | |
| 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 |
| First Install Time | `getFirstInstallTime()` | 1505607068808 | Only supported in Android |
| Last Install Time | `getLastUpdateTime()` | 1505607068808 | Only supported in Android |
| Serial Number | `getSerialNumber()` | | Only supported in Android
| IP Address | `getIPAddress()` | | Only supported in Android
| MAC Address | `getMACAddress()` | | Only supported in Android
| Device Unique ID | `getUniqueID()` | `string` e.g. "FCDBD8EF-62FC-4ECB-B2F5-92C9E79AC7F9" | This is IDFV on iOS so it will change if all apps from the current apps vendor have been previously uninstalled. |
| Device Manufacturer | `getManufacturer()` | `string` e.g. "Apple" | |
| Device Brand | `getBrand()` | `string` e.g. "Apple / htc / Xiaomi" | |
| Device Model | `getModel()` | `string` e.g. "iPhone 6" | |
| Device ID | `getDeviceId()` | `string` e.g. "iPhone7,2" | Or the board on Android e.g. goldfish |
| System Name | `getSystemName()` | `string` e.g. "iPhone OS" | |
| System Version | `getSystemVersion()` | `string` e.g. "9.0" | |
| Bundle ID | `getBundleId()` | `string` e.g. "com.learnium.mobile" | |
| Build Number | `getBuildNumber()` | `string` e.g. "89" | |
| App Version | `getVersion()` | `string` e.g. "1.1.0" | |
| App Version (Readable) | `getReadableVersion()` | `string` e.g. "1.1.0.89" | |
| Device Name | `getDeviceName()` | `string` e.g. "Becca's iPhone 6" | |
| User Agent | `getUserAgent()` | `string` e.g. "Dalvik/2.1.0 (Linux; U; Android 5.1; Google Nexus 4 - 5.1.0 - API 22 - 768x1280 Build/LMY47D)" | |
| Device Locale | `getDeviceLocale()` | `string` e.g. "en-US" | |
| Device Country | `getDeviceCountry()` | `string` e.g. "US" | |
| Timezone | `getTimezone()` | `string` e.g. "America/Mexico_City" | |
| App is running in emulator | `isEmulator()` | `boolean` e.g. true | if app is running in emulator return true |
| App is running on a tablet | `isTablet()` | `boolean` e.g. true | if app is running on a tablet return true |
| PIN or fingerprint set | `isPinOrFingerprintSet()` | `(callback: (isPinOrFingerprintSet: boolean) => void) => void` | Only supported in Android and iOS 9.0 and above |
| API Level | `getAPILevel()` | `number` e.g. 25 | ANDROID ONLY - see [API Levels](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)|
| App Instance ID | `getInstanceID()` | `string` | ANDROID ONLY - see https://developers.google.com/instance-id/ |
| Phone Number | `getPhoneNumber()` | `?string` e.g. "2348675309" or "" | Only supported in Android |
| First Install Time | `getFirstInstallTime()` | `number` e.g. 1505607068808 | Only supported in Android |
| Last Install Time | `getLastUpdateTime()` | `number` e.g. 1505607068808 | Only supported in Android |
| Serial Number | `getSerialNumber()` | `string` | Only supported in Android
| IP Address | `getIPAddress()` | `Promise<string>` | Only supported in Android
| MAC Address | `getMACAddress()` | `Promise<string>` | Only supported in Android

Since the device setting for PIN/Fingerprint can be modified while the app is still open, this is available via callback instead of as a constant. To use, pass a callback function to the returned bridge function in your javascript:

Expand Down

0 comments on commit dbbe53f

Please sign in to comment.