Ticket T435451
Visible to All Users

How to get device uuid

created 8 years ago

in my index.js i have:

$(document).on("deviceready", function () {
        navigator.splashscreen.hide();
        if(window.devextremeaddon) {
            window.devextremeaddon.setup();
        }
        $(document).on("backbutton", function () {
            DevExpress.processHardwareBackButton();
        });
        deviceID(device.uuid);
        DevExpress.ui.notify(deviceID() + " as your device id", 'info', 300);

}
    });
to get the identity of the device (sample project attached) but the uuid keeps changing with each installation.

IS THERE WAY TO GET THE UDID OF THE DEVICE SINCE THAT IS NOT CHANGING and could be used as identifier?

Answers approved by DevExpress Support

created 8 years ago

Hello Markus,

Yes, it seems the 'cordova-plugin-device' plug-in does not keep the uuid after reinstalling the application.
I suggest you use the 'cordova-plugin-uniquedeviceid' plug-in. Please refer to the plug-in GitHub repository.
Note also that it is necessary to build a custom PhoneGap application template.

Also, we are informed about the An error occurs on an attempt to build an iOS package with a custom template issue.
While we are fixing this problem, I suggest you set the 'phonegap-version' preference to 'cli-5.2.0' in the 'config.xml' file.

So, the 'config.xml' file must contain these lines:

XML
<preference name="phonegap-version" value="cli-5.2.0" /> <plugin name="cordova-plugin-uniquedeviceid"/>

And the 'index.js' file:

JavaScript
... $(document).on("deviceready", function () { ... window.plugins.uniqueDeviceID.get( function (uuid) { DevExpress.ui.notify(uuid + ' as your device id', 'info', 3000); }, function (error) { DevExpress.ui.notify(error, 'error', 3000); }); ...
    Show previous comments (3)
    Alex Skorkin (DevExpress) 8 years ago

      You are welcome, Markus.

        Alex,

        is it possible to include the cordovo in my DevExtreme application without having to go through https://build.phonegap.com?

        Thanks,
        Jassim

        DevExpress Support Team 8 years ago

          @Jassim,
          I kindly ask you not to post your questions under posts of other customers, but create a separate thread for each of your questions instead. Your cooperation is highly appreciated.
          For now, I have created a separate issue on your behalf: T543444: is it possible to include Cordova without having to go throughhttps://build.phonegap.com

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.