nativescript-dna-deviceinfo
Advanced tools
Comparing version 2.4.2 to 2.4.3
@@ -34,2 +34,3 @@ import { Carrier, DisplayMetrics, StorageVolume } from './deviceinfo.interface'; | ||
static isBluetoothEnabled(): Promise<boolean>; | ||
private static androidSupport; | ||
private static memoryInfo; | ||
@@ -36,0 +37,0 @@ private static totalSpace; |
@@ -260,3 +260,3 @@ "use strict"; | ||
var permission = android.Manifest.permission; | ||
var contextCompat = android.support.v4.content.ContextCompat; | ||
var contextCompat = DeviceInfo_1.androidSupport().content.ContextCompat; | ||
var PackageManager = android.content.pm.PackageManager; | ||
@@ -361,3 +361,3 @@ var permissionCL = permission.ACCESS_COARSE_LOCATION; | ||
var permission = android.Manifest.permission; | ||
var contextCompat = android.support.v4.content.ContextCompat; | ||
var contextCompat = DeviceInfo_1.androidSupport().content.ContextCompat; | ||
var PackageManager = android.content.pm.PackageManager; | ||
@@ -402,3 +402,3 @@ var permissionFL = permission.ACCESS_FINE_LOCATION; | ||
var permission = android.Manifest.permission; | ||
var contextCompat = android.support.v4.content.ContextCompat; | ||
var contextCompat = DeviceInfo_1.androidSupport().content.ContextCompat; | ||
var PackageManager = android.content.pm.PackageManager; | ||
@@ -414,2 +414,11 @@ var permissionStatus = contextCompat.checkSelfPermission(ctx, permission.BLUETOOTH); | ||
}; | ||
DeviceInfo.androidSupport = function () { | ||
var anyGlobal = global; | ||
if (anyGlobal.androidx && anyGlobal.androidx.core) { | ||
return anyGlobal.androidx.core; | ||
} | ||
else if (android.support && android.support.v4) { | ||
return android.support.v4; | ||
} | ||
}; | ||
DeviceInfo.memoryInfo = function () { | ||
@@ -507,3 +516,3 @@ var actMgr = (application_1.getNativeApplication() | ||
var permission = android.Manifest.permission.READ_PHONE_STATE; | ||
var contextCompat = android.support.v4.content.ContextCompat; | ||
var contextCompat = DeviceInfo_1.androidSupport().content.ContextCompat; | ||
var permissionStatus = contextCompat.checkSelfPermission(ctx, permission); | ||
@@ -521,3 +530,3 @@ if (permissionStatus === android.content.pm.PackageManager.PERMISSION_GRANTED) { | ||
var permission = android.Manifest.permission.ACCESS_COARSE_LOCATION; | ||
var contextCompat = android.support.v4.content.ContextCompat; | ||
var contextCompat = DeviceInfo_1.androidSupport().content.ContextCompat; | ||
var permissionStatus = contextCompat.checkSelfPermission(ctx, permission); | ||
@@ -524,0 +533,0 @@ if (permissionStatus === android.content.pm.PackageManager.PERMISSION_GRANTED) { |
@@ -1,3 +0,28 @@ | ||
import { RadioAccessTechnology, WCTGeneration } from "./index.d"; | ||
export { RadioAccessTechnology, WCTGeneration }; | ||
export declare const enum RadioAccessTechnology { | ||
UNKNOWN = 0, | ||
CDMA = 1, | ||
CDMAEVDORev0 = 2, | ||
CDMAEVDORevA = 3, | ||
CDMAEVDORevB = 4, | ||
EDGE = 5, | ||
EHRPD = 6, | ||
GPRS = 7, | ||
HSPA = 8, | ||
HSDPA = 9, | ||
HSPAP = 10, | ||
HSUPA = 11, | ||
NR = 12, | ||
IDEN = 13, | ||
IWLAN = 14, | ||
UMTS = 15, | ||
LTE = 16, | ||
WCDMA = 17 | ||
} | ||
export declare const enum WCTGeneration { | ||
_UNKNOWN = "UnKnown", | ||
_2G = "2G", | ||
_3G = "3G", | ||
_4G = "4G", | ||
_5G = "5G" | ||
} | ||
export interface Carrier { | ||
@@ -4,0 +29,0 @@ carrierName: string; |
@@ -305,2 +305,5 @@ "use strict"; | ||
"iPhone11,8": "iPhone XR", | ||
"iPhone12,1": "iPhone 11", | ||
"iPhone12,3": "iPhone 11 Pro", | ||
"iPhone12,5": "iPhone 11 Pro Max", | ||
"iPod1,1": "1st Gen iPod", | ||
@@ -312,2 +315,3 @@ "iPod2,1": "2nd Gen iPod", | ||
"iPod7,1": "6th Gen iPod", | ||
"iPod9,1": "7th Gen iPod", | ||
"iPad1,1": "iPad", | ||
@@ -361,2 +365,6 @@ "iPad1,2": "iPad 3G", | ||
"iPad8,8": "iPad Pro 3rd Gen (12.9 inch, 1TB, WiFi+Cellular)", | ||
"iPad11,1": "iPad mini 5th Gen (WiFi)", | ||
"iPad11,2": "iPad mini 5th Gen", | ||
"iPad11,3": "iPad Air 3rd Gen (WiFi)", | ||
"iPad11,4": "iPad Air 3rd Gen", | ||
"Watch1,1": "Apple Watch 38mm case", | ||
@@ -376,2 +384,6 @@ "Watch1,2": "Apple Watch 38mm case", | ||
"Watch4,4": "Apple Watch Series 4 44mm case (GPS+Cellular)", | ||
"Watch5,1": "Apple Watch Series 5 40mm case (GPS)", | ||
"Watch5,2": "Apple Watch Series 5 44mm case (GPS)", | ||
"Watch5,3": "Apple Watch Series 5 40mm case (GPS+Cellular)", | ||
"Watch5,4": "Apple Watch Series 5 44mm case (GPS+Cellular)" | ||
}; | ||
@@ -378,0 +390,0 @@ DeviceInfo = DeviceInfo_1 = __decorate([ |
@@ -1,33 +0,7 @@ | ||
import { Carrier, StorageVolume, DisplayMetrics } from './deviceinfo.interface'; | ||
import { Carrier, StorageVolume, DisplayMetrics, RadioAccessTechnology, WCTGeneration } from './deviceinfo.interface'; | ||
export const enum RadioAccessTechnology { | ||
UNKNOWN, | ||
CDMA, | ||
CDMAEVDORev0, | ||
CDMAEVDORevA, | ||
CDMAEVDORevB, | ||
EDGE, | ||
EHRPD, | ||
GPRS, | ||
HSPA, | ||
HSDPA, | ||
HSPAP, | ||
HSUPA, | ||
NR, | ||
IDEN, | ||
IWLAN, | ||
UMTS, | ||
LTE, | ||
WCDMA, | ||
} | ||
export { RadioAccessTechnology, WCTGeneration }; | ||
export const enum WCTGeneration { | ||
_UNKNOWN = "UnKnown", | ||
_2G = "2G", | ||
_3G = "3G", | ||
_4G = "4G", | ||
_5G = "5G" | ||
} | ||
export declare function staticDecorator<T>(): (constructor: T) => void; | ||
export declare function staticDecorator<T>(): (constructor: T) => void; | ||
export declare class DeviceInfo { | ||
@@ -62,2 +36,2 @@ static totalMemory(): number; | ||
static isBluetoothEnabled(): Promise<boolean>; | ||
} | ||
} |
{ | ||
"name": "nativescript-dna-deviceinfo", | ||
"version": "2.4.2", | ||
"version": "2.4.3", | ||
"description": "NativeScript plugin to acquire device information.", | ||
@@ -9,4 +9,4 @@ "main": "deviceinfo", | ||
"platforms": { | ||
"android": "5.4.0", | ||
"ios": "5.4.0" | ||
"android": "6.0.0", | ||
"ios": "6.0.1" | ||
} | ||
@@ -22,16 +22,11 @@ }, | ||
"build.native": "node scripts/build-native.js", | ||
"postclone": "npm i && node scripts/postclone.js", | ||
"tslint": "cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\"", | ||
"plugin.tscwatch": "npm run tsc -- -w", | ||
"ci.tslint": "npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/platforms/**'", | ||
"prepack": "npm run build.native", | ||
"demo.ios": "npm i && cd ../demo && tns run ios", | ||
"demo.ios.debug": "npm run tsc && cd ../demo && tns debug ios", | ||
"demo.ios": "npm run tsc && cd ../demo && tns run ios --syncAllFiles --emulator", | ||
"demo.android": "npm run tsc && cd ../demo && tns run android --syncAllFiles --emulator", | ||
"demo.android": "npm i && cd ../demo && tns run android", | ||
"demo.reset": "cd ../demo && npx rimraf -- hooks node_modules platforms package-lock.json", | ||
"demo-angular.ios": "npm run tsc && cd ../demo-angular && tns run ios --syncAllFiles --emulator", | ||
"demo-angular.android": "npm run tsc && cd ../demo-angular && tns run android --syncAllFiles --emulator", | ||
"demo-angular.reset": "cd ../demo-angular && npx rimraf -- hooks node_modules platforms package-lock.json", | ||
"plugin.prepare": "npm run build && cd ../demo && tns plugin remove nativescript-dna-deviceinfo && tns plugin add ../src && cd ../demo-angular && tns plugin remove nativescript-dna-deviceinfo && tns plugin add ../src", | ||
"clean": "npm run demo.reset && npm run demo-angular.reset && npx rimraf -- node_modules package-lock.json && npm i" | ||
"plugin.prepare": "npm run build && cd ../demo && tns plugin remove nativescript-dna-deviceinfo && tns plugin add ../src", | ||
"clean": "npm run demo.reset && npx rimraf -- node_modules package-lock.json && npm i" | ||
}, | ||
@@ -92,9 +87,9 @@ "keywords": [ | ||
"devDependencies": { | ||
"tns-core-modules": "^6.0.0", | ||
"tns-platform-declarations": "^6.0.0", | ||
"typescript": "~3.4.5", | ||
"prompt": "^1.0.0", | ||
"rimraf": "^2.6.3", | ||
"semver": "^5.6.0", | ||
"tns-core-modules": "^5.0.0", | ||
"tns-platform-declarations": "^5.0.0", | ||
"tslint": "^5.12.1", | ||
"typescript": "~3.3.3" | ||
"semver": "^5.6.0" | ||
}, | ||
@@ -101,0 +96,0 @@ "dependencies": {}, |
@@ -444,5 +444,7 @@ | ||
- 2.4.2: Handled crash in the API *cellularServiceProviders* for the Android platform. | ||
- 2.4.3: For iOS, extended the list of devices with Watch-5, iPhone 11(Pro and Max), iPad mini 5th Gen, and Apple Watch Series 5. For Android, support for AndroidX is added. Bumped up version of various packages. | ||
## License | ||
MIT license (see LICENSE file) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
368724
14763
450