Generic device id (Android, iOS, WP)?

119 views
Skip to first unread message

mikko.nu...@gmail.com

unread,
Sep 7, 2015, 4:07:40 AM9/7/15
to CodenameOne Discussions
Hello,

I was wondering it there is a generic device id or something to identify any device for extra protection (Android, iOS, WP)? I guess there is not, and if so do those three platforms have have any identifiers that I could get from code... I know iOS has UDID (Display.getInstance.getUdid())?

Shai Almog

unread,
Sep 8, 2015, 12:27:45 AM9/8/15
to CodenameOne Discussions, mikko.nu...@gmail.com
Hi,
Android has the IMEI and UDID should work for it too. Either way using these values isn't recommended. With Android it will trigger extra permissions and with iOS Apple is discouraging this and blocked the official UDID code (we are using a "fake" UDID library).

mikko.nu...@gmail.com

unread,
Sep 8, 2015, 3:08:53 AM9/8/15
to CodenameOne Discussions, mikko.nu...@gmail.com
Hi Shai,

let me put it this way. Is there any way to identify the end user's device (phone / tablet) using Codename One for "all" three platforms WP, Android and iOS? My goal is to pair the user's device to governing system to decrease the possibility of misuse. The governing system would upkeep the allowed device identifiers.


Shai Almog

unread,
Sep 8, 2015, 11:14:38 PM9/8/15
to CodenameOne Discussions, mikko.nu...@gmail.com
Hi,
I don't think there is a way to do this natively. You can use getUDID and assume that its sometimes null or unreliable.
If you can find a way to do this in native you can always use native interfaces which is pretty easy:
http://www.codenameone.com/how-do-i---access-native-device-functionality-invoke-native-interfaces.html

mikko.nu...@gmail.com

unread,
Sep 9, 2015, 7:55:56 AM9/9/15
to CodenameOne Discussions, mikko.nu...@gmail.com
Ok,

thank you. I'll check how that works.

Jérémy MARQUER

unread,
Aug 30, 2016, 10:11:29 AM8/30/16
to CodenameOne Discussions, mikko.nu...@gmail.com
Hi,

Is there is any news about that ?

I would like to identify each device.

Thanks !

Shai Almog

unread,
Aug 31, 2016, 12:13:38 AM8/31/16
to CodenameOne Discussions, mikko.nu...@gmail.com
Hi,
Still prohibited by Apple.
Reply all
Reply to author
Forward
0 new messages