Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
cordova-plugin-deviceinfo
Advanced tools
BlackBerry 10 Community Contributed API to get hardware and network information from the device
This extension provides additional APIs to identify the device.
1.0.0 Initial Release
1.0.1 Bug fix for getNetwork() on 10.3.0+
Author(s)
This API can be installed from source or from NPM. Installation from NPM is done through the following:
cordova plugin add cordova-plugin-deviceinfo
Installation from source is the same but instead of the id ("cordova-plugin-deviceinfo"), use the file system path to the source plugin folder.
//returns model number i.e. 'Z10' community.deviceInfo.getModelNumber()
//returns whether the device is a Simulator - 'true' or 'false' community.deviceInfo.isSimulator()
//returns Roaming Status as 'true' or 'false' community.deviceInfo.getRoamingStatus()
//returns whether device has physical keyboard as 0 or 1 community.deviceInfo.hasPhysicalKeyboard()
The following APIs require the following permission: read_cellular_data
//returns Mobile Country Code community.deviceInfo.getMCC() //returns Mobile Network Code, that identifies the carrier community.deviceInfo.getMNC()
The following API returns detailed network information for the default interface (ideally WIFI or Cellular)
//returns network information as a JSON object community.deviceInfo.getNetwork() Returned object structure... status - True/False - did the API work? ifconnected - True/False - is the interface connected? ifipcount - Number of IP addresses - should be 2, one IPv4 and one IPv6 ifname - Interface name, e.g. bcm0 ifstatus - Status of the interface - should be 1 (see [1] below) iftype - Type of the interface (see [2] below) ifup - True/False - is the interface up? iplist - Array of ifipcount object ifaddress - IP of this connection [IPv4 / IPv6] ifnetmark - Netmask of this connection [IPv4 / IPv6] [1] Possible ifstatus values (from netstatus.h) NETSTATUS_IP_STATUS_ERROR_UNKNOWN = 0; NETSTATUS_IP_STATUS_OK = 1; NETSTATUS_IP_STATUS_ERROR_NOT_CONNECTED = 2; NETSTATUS_IP_STATUS_ERROR_NOT_UP = 3; NETSTATUS_IP_STATUS_ERROR_NOT_CONFIGURED = 4; NETSTATUS_IP_STATUS_ERROR_IP6_OFF = 5; NETSTATUS_IP_STATUS_ERROR_NO_IP_ADDRESS = 6; NETSTATUS_IP_STATUS_ERROR_NO_IP6_ADDRESS = 7; NETSTATUS_IP_STATUS_ERROR_NO_IP_GATEWAY = 8; NETSTATUS_IP_STATUS_ERROR_NO_IP6_GATEWAY = 9; NETSTATUS_IP_STATUS_ERROR_NO_NAME_SERVER = 10; [2] Possible iftype values (from netstatus.h) NETSTATUS_INTERFACE_TYPE_UNKNOWN = 0; NETSTATUS_INTERFACE_TYPE_WIRED = 1; NETSTATUS_INTERFACE_TYPE_WIFI = 2; NETSTATUS_INTERFACE_TYPE_BLUETOOTH_DUN = 3; NETSTATUS_INTERFACE_TYPE_USB = 4; NETSTATUS_INTERFACE_TYPE_VPN = 5; NETSTATUS_INTERFACE_TYPE_BB = 6; NETSTATUS_INTERFACE_TYPE_CELLULAR = 7; NETSTATUS_INTERFACE_TYPE_P2P = 8;
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
BlackBerry 10 Community Contributed API to get hardware and network information from the device
We found that cordova-plugin-deviceinfo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.