0

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.

Martin
  • 1,283
  • 2
  • 14
  • 28
  • Missing decimal point? You mean in the on-screen keyboard, or are you talking about a phone with actual pushbuttons? – Mr Lister May 08 '15 at 11:27

2 Answers2

2

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/

manzapanza
  • 6,087
  • 4
  • 39
  • 48
1

You can't get the constructor name with cordova & ionic.

However, you can have access to the model of the device : http://ngcordova.com/docs/plugins/device/

If you manage Samsung device list and compare it to getModel() value you can know therefore if the device is a samsung or not.

aorfevre
  • 5,034
  • 3
  • 21
  • 51