Skip to content
Detect mobile's device model using javascript
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
device.js
example.html

README.md

Usage

Only one file (device.js) need to be included.

Example: https://joyqi.github.io/mobile-device-js/example.html

MobileDevice.getGlRenderer()

Returns GPU Model Name (eg: Apple A8 GPU).

MobileDevice.getModels()

Returns device models list (eg: ["iPad Air 2", "iPad Mini 4"]).

MobileDevice.is(match)

Detect device model.

MobileDevice.is('iPhone')
MobileDevice.is('iPhone 6s')

TODO

  1. Android Devices :)
You can’t perform that action at this time.