Tutorialsplane

Get the device UUID in Ionic Framework


Get the device UUID in Ionic Framework : Device UUID can be get using cordova plugin(org.apache.cordova.device) cordova plugin is used to communicate and retrieve the Device UUID. Just Install the cordova plugin org.apache.cordova.device and use the below code to get the device id. We have explained the example below-


Get the device UUID in Ionic Framework

Here is the simple example to get UUID in ionic framework-

Get the device UUID in Ionic Framework

module.controller('MyCtrl', function($scope, $cordovaDevice) {
  var device_uuid = $cordovaDevice.getUUID();
});

Which Return the device UUID.

Note : Without cordova plugin it will not work so please check you have installed the plugin org.apache.cordova.device.

Ionic FAQ