Reputation: 1343
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.
Upvotes: 0
Views: 947
Reputation: 6225
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/
Upvotes: 2
Reputation: 5064
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.
Upvotes: 1