{"_id":"@comingzones/cordova-plugin-device","name":"@comingzones/cordova-plugin-device","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@comingzones/cordova-plugin-device","version":"1.0.0","description":"Cordova Device Plugin","types":"./types/index.d.ts","cordova":{"id":"@comingzones/cordova-plugin-device","platforms":["android","ios","windows","browser","osx"]},"repository":{"type":"git","url":"git+ssh://git@github.com/comingzones/cordova-plugin-device.git"},"keywords":["cordova","device","ecosystem:cordova","cordova-android","cordova-ios","cordova-windows","cordova-browser","cordova-osx"],"scripts":{"test":"npm run eslint","eslint":"node node_modules/eslint/bin/eslint www && node node_modules/eslint/bin/eslint src && node node_modules/eslint/bin/eslint tests"},"author":{"name":"dev@comingzones.com"},"gitHead":"17c9647808e399a60d627272de3cc92f151fdb73","bugs":{"url":"https://github.com/comingzones/cordova-plugin-device/issues"},"homepage":"https://github.com/comingzones/cordova-plugin-device#readme","_id":"@comingzones/cordova-plugin-device@1.0.0","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-ibkclCQfNerSTLcesEXgqShmlfuTjVQkQujmHgLjb0WXPD5vdJj0G2h1ENFFx4DKGq7oIsVukmnshjptZeSNTQ==","shasum":"4005fdf84b06270560aee3bc16f0272c6eda49e0","tarball":"https://registry.npmjs.org/@comingzones/cordova-plugin-device/-/cordova-plugin-device-1.0.0.tgz","fileCount":19,"unpackedSize":67849,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHVxOEyQw2Da3sS/Q64sibN6PFLaSgCBYashm2Q9m47QAiEAgP9puUaixIr6LDWBLf/FNWa/SINI0a9YWCFmQJHm3aE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAk1UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0vw//WZsLEi4Du2pdiCOqxWKAJAvHfn1PWb/dC8q9Cinl9XLuAkku\r\nSQzNUjXTiFwrocExkKEJEpELjd/MkR/lsYLbhqS1Lh1GNtZQhtOtwvrIK94a\r\nwiE9Dv2HF9uFZhamw5JB43CMmw/KYy1ltopo05w6syXTFrNKRpahlMCjyXKy\r\nUiCIV+sFs3vRqm3IY3xW15B/H/xzAx293WCzC0UsSLQDyv09Va1SFhbpBGQ2\r\nkEPCXarD3aYhsrqDRoi2zVjVgo/2Do5ocbQv9wy6SpC96uUmFbUEXGKIaZ7t\r\n2vXoaWU3e/ZcR2GzFksdZWUoXIKfNTEKmjX/hd9zP1Pb3rf7B/BVEKi42HCV\r\nSDXAkHddjh4fuWtrPRRdiOyFHK3N2SK2/J/AdEJTxEJ6eTZKP8EPgruvx6MZ\r\nnkZ1gMqwFqtjCc5VrK/b9M9rXcWaHcx3nAplzBZU6+4pbNBTkp6yiEKA/6LJ\r\n08dqUwYeSe1VjylXDR32I/RpEnTnxBnS7wdzyLJtFpZtsZlbFJcVywYz+H9Y\r\nfsYQ7Fo5fre5D/7rVIH00Eyhg/MjC/8szD1L+c0GIVY8hoCGugmWJPcafsmo\r\ngPrzFRfV4UKOdMY5jT2N2NDE1COMfFDTMA8pb5w8SUgNAgidcg9Rwsh2YsUL\r\n/p4mY+uAG0N9dxpnl7hQOCwTJh73Bb33Vz0=\r\n=2OJy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"comingzones2020","email":"darrenhou1993@gmail.com"},"directories":{},"maintainers":[{"name":"comingzones2020","email":"darrenhou1993@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-plugin-device_1.0.0_1661095251851_0.7516674382489192"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-21T15:20:51.792Z","1.0.0":"2022-08-21T15:20:52.043Z","modified":"2022-08-21T15:20:52.196Z"},"maintainers":[{"name":"comingzones2020","email":"darrenhou1993@gmail.com"}],"description":"Cordova Device Plugin","homepage":"https://github.com/comingzones/cordova-plugin-device#readme","keywords":["cordova","device","ecosystem:cordova","cordova-android","cordova-ios","cordova-windows","cordova-browser","cordova-osx"],"repository":{"type":"git","url":"git+ssh://git@github.com/comingzones/cordova-plugin-device.git"},"author":{"name":"dev@comingzones.com"},"bugs":{"url":"https://github.com/comingzones/cordova-plugin-device/issues"},"readme":"---\ntitle: Device\ndescription: Get device information.\n---\n<!--\n# license: Licensed to the Apache Software Foundation (ASF) under one\n#         or more contributor license agreements.  See the NOTICE file\n#         distributed with this work for additional information\n#         regarding copyright ownership.  The ASF licenses this file\n#         to you under the Apache License, Version 2.0 (the\n#         \"License\"); you may not use this file except in compliance\n#         with the License.  You may obtain a copy of the License at\n#\n#           http://www.apache.org/licenses/LICENSE-2.0\n#\n#         Unless required by applicable law or agreed to in writing,\n#         software distributed under the License is distributed on an\n#         \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n#         KIND, either express or implied.  See the License for the\n#         specific language governing permissions and limitations\n#         under the License.\n-->\n\n|AppVeyor|Travis CI|\n|:-:|:-:|\n|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-device?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-device)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)|\n\n# cordova-plugin-device\n\nThis plugin defines a global `device` object, which describes the device's hardware and software.\nAlthough the object is in the global scope, it is not available until after the `deviceready` event.\n\n```js\ndocument.addEventListener(\"deviceready\", onDeviceReady, false);\nfunction onDeviceReady() {\n    console.log(device.cordova);\n}\n```\n\n## Installation\n\n    cordova plugin add cordova-plugin-device\n\n## Properties\n\n- device.cordova\n- device.model\n- device.platform\n- device.uuid\n- device.version\n- device.manufacturer\n- device.isVirtual\n- device.serial\n\n## device.cordova\n\nGet the version of Cordova running on the device.\n\n### Supported Platforms\n\n- Android\n- Browser\n- iOS\n- Windows\n- OSX\n\n## device.model\n\nThe `device.model` returns the name of the device's model or\nproduct. The value is set by the device manufacturer and may be\ndifferent across versions of the same product.\n\n### Supported Platforms\n\n- Android\n- Browser\n- iOS\n- Windows\n- OSX\n\n### Quick Example\n\n```js\n// Android:    Nexus One       returns \"Passion\" (Nexus One code name)\n//             Motorola Droid  returns \"voles\"\n// BlackBerry: Torch 9800      returns \"9800\"\n// Browser:    Google Chrome   returns \"Chrome\"\n//             Safari          returns \"Safari\"\n// iOS:     for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models\n// OSX:                        returns \"x86_64\"\n//\nvar model = device.model;\n```\n\n### Android Quirks\n\n- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.\n\n## device.platform\n\nGet the device's operating system name.\n\n```js\nvar string = device.platform;\n```\n### Supported Platforms\n\n- Android\n- Browser\n- iOS\n- Windows\n- OSX\n\n### Quick Example\n\n```js\n// Depending on the device, a few examples are:\n//   - \"Android\"\n//   - \"BlackBerry 10\"\n//   - \"browser\"\n//   - \"iOS\"\n//   - \"WinCE\"\n//   - \"Tizen\"\n//   - \"Mac OS X\"\nvar devicePlatform = device.platform;\n```\n\n## device.uuid\n\nGet the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).\n\n```js\nvar string = device.uuid;\n```\n\n### Description\n\nThe details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.\n\n### Supported Platforms\n\n- Android\n- iOS\n- Windows\n- OSX\n\n### Quick Example\n\n```js\n// Android: Returns a random 64-bit integer (as a string, again!)\n//          The integer is generated on the device's first boot\n//\n// BlackBerry: Returns the PIN number of the device\n//             This is a nine-digit unique integer (as a string, though!)\n//\n// iPhone: (Paraphrased from the UIDevice Class documentation)\n//         Returns the [UIDevice identifierForVendor] UUID which is unique and the same for all apps installed by the same vendor. However the UUID can be different if the user deletes all apps from the vendor and then reinstalls it.\n// Windows Phone 7 : Returns a hash of device+current user,\n// if the user is not defined, a guid is generated and will persist until the app is uninstalled\n// Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number\n// unique to every GSM and UMTS mobile phone.\nvar deviceID = device.uuid;\n```\n\n### iOS Quirk\n\nThe `uuid` on iOS uses the identifierForVendor property. It is unique to the device across the same vendor, but will be different for different vendors and will change if all apps from the vendor are deleted and then reinstalled.\nRefer [here](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/#//apple_ref/occ/instp/UIDevice/identifierForVendor) for details.\nThe UUID will be the same if app is restored from a backup or iCloud as it is saved in preferences. Users using older versions of this plugin will still receive the same previous UUID generated by another means as it will be retrieved from preferences.\n\n### OSX Quirk\n\nThe `uuid` on OSX is generated automatically if it does not exist yet and is stored in the `standardUserDefaults` in the `CDVUUID` property.\n\n## device.version\n\nGet the operating system version.\n\n    var string = device.version;\n\n### Supported Platforms\n\n- Android 2.1+\n- Browser\n- iOS\n- Windows\n- OSX\n\n### Quick Example\n\n```js\n// Android:    Froyo OS would return \"2.2\"\n//             Eclair OS would return \"2.1\", \"2.0.1\", or \"2.0\"\n//             Version can also return update level \"2.1-update1\"\n//\n// BlackBerry: Torch 9800 using OS 6.0 would return \"6.0.0.600\"\n//\n// Browser:    Returns version number for the browser\n//\n// iPhone:     iOS 3.2 returns \"3.2\"\n//\n// Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720\n// Windows 8: return the current OS version, ex on Windows 8.1 returns 6.3.9600.16384\n// Tizen: returns \"TIZEN_20120425_2\"\n// OSX:        El Capitan would return \"10.11.2\"\n//\nvar deviceVersion = device.version;\n```\n\n## device.manufacturer\n\nGet the device's manufacturer.\n\n    var string = device.manufacturer;\n\n### Supported Platforms\n\n- Android\n- iOS\n- Windows\n\n### Quick Example\n\n```js\n// Android:    Motorola XT1032 would return \"motorola\"\n// BlackBerry: returns \"BlackBerry\"\n// iPhone:     returns \"Apple\"\n//\nvar deviceManufacturer = device.manufacturer;\n```\n\n## device.isVirtual\n\nwhether the device is running on a simulator.\n\n```js\nvar isSim = device.isVirtual;\n```\n\n### Supported Platforms\n\n- Android 2.1+\n- Browser\n- iOS\n- Windows\n- OSX\n\n### OSX and Browser Quirk\n\nThe `isVirtual` property on OS X and Browser always returns false.\n\n## device.serial\n\nGet the device hardware serial number ([SERIAL](http://developer.android.com/reference/android/os/Build.html#SERIAL)).\n\n```js\nvar string = device.serial;\n```\n\n### Supported Platforms\n\n- Android\n- OSX\n\n","readmeFilename":"README.md"}