Search code examples
cordovaionic-frameworkdevicesamsung-mobile

How to detect if device is a Samsung device


Is it possible to detect if device is a Samsung device? I would like to show for all other devices and for Samsung devices because of the missing decimal point on some Samsung devices.


Solution

  • Take a look to the Cordova Device Plugin:

    http://plugins.cordova.io/#/package/org.apache.cordova.device

    Run:

    cordova plugin add org.apache.cordova.device
    

    And in your code:

    console.log(device.model);
    

    There is also available with ngCordova: http://ngcordova.com/docs/plugins/device/