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.
Asked
Active
Viewed 903 times
0
-
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 Answers
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
-
1WARNING: device.name is deprecated as of version 2.3.0. Use device.model instead. – aorfevre May 08 '15 at 11:34
-
1Moreover org.apache.cordova.device is deprecated for cordova-plugin-device – aorfevre May 09 '15 at 12:27
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