This ANE provides you with some properties which they return different Device Identifiers. You may use them in your apps to identify your users even if your users are uninstalling/re-installing your apps. Nevertheless, make sure to read this blog to learn the differences between the ANE properties and use the one which best suits your app requirements.
This ANE provides you with the following Identifiers:
- Android ID
- Serial Number
- Telephony Device ID
- Telephony Subscriber ID
- UUID
- Unique Vendor ID
- Advertising ID
find the latest asdoc for this ANE here.
For the complete AS3 code usage, see the demo project here.
import com.myflashlab.air.extensions.udid.UDID;
UDID.init();
if(UDID.OS == UDID.ANDROID) trace(UDID.androidId);
else if(UDID.OS == UDID.IOS) trace(UDID.vendorId);
<!--
FOR ANDROID:
-->
<uses-sdk android:targetSdkVersion="28"/>
<uses-sdk android:minSdkVersion="19"/>
<!--Required if you are using TelephonyManager API or UDID.serialNumber -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!--Required if you want to use the Android Advert ID-->
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<!--
Embedding the ANE:
-->
<extensions>
<extensionID>com.myflashlab.air.extensions.udid</extensionID>
<!-- dependency ANEs https://github.com/myflashlab/common-dependencies-ANE -->
<extensionID>com.myflashlab.air.extensions.dependency.androidx.arch</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.androidx.core</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.androidx.design</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.androidx.lifecycle</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.basement</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.ads</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.ads.lite</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.gass</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.overrideAir</extensionID>
<!-- Required if you are using TelephonyManager API-->
<extensionID>com.myflashlab.air.extensions.permissionCheck</extensionID>
</extensions>
- Android SDK 19+
- iOS 10.0+
- AIR SDK 33+
Below are the list of Permissions this ANE might require. Check out the demo project available at this repository to see how we have used the PermissionCheck ANE to ask for the permissions.
Necessary | Optional |
---|---|
. | SOURCE_PHONE |
https://www.myflashlabs.com/product/unique-device-id-air-native-extension/
How to embed ANEs into FlashBuilder, FlashCC and FlashDevelop
https://support.google.com/googleplay/android-developer/answer/6048248?hl=en
https://play.google.com/about/monetization-ads/ads/ad-id/
https://apsalar.com/2015/06/all-about-idfa/
If you are an active MyFlashLabs club member, you will have access to our private and secure support ticket system for all our ANEs. Even if you are not a member, you can still receive premium help if you purchase the premium support package.