AIR 3.5 Mobile project device ID

前端 未结 2 802
耶瑟儿~
耶瑟儿~ 2021-01-14 12:06

I am wondering if someone knows the best method for storing data in a global DB against a mobile device (iOS and Android)?

I am building an app that writes/retrieves

2条回答
  •  Happy的楠姐
    2021-01-14 12:19

    As of now I don't think its possible to get the hardware devices guid using air mobile. However you do have a couple of options.

    If the MAC address is good enough for you there is an ANE that will let you grab it on both iOS and Android.

    http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/networkinfo.html

    and an example of how to use it

    http://cookbooks.adobe.com/post_Getting_NetworkInfo_from_both_Android_and_iOS-19473.html

    You could also write your own ANE, it should be pretty simple to wrap both Android and iOS implementations.

    Objective-c: [[UIDevice currentDevice] uniqueIdentifier]

    Android: TelephonyManager.getDeviceId()

    If your app requires any kind of user account or login the best option would be to store this setting in the remote db.

提交回复
热议问题