Integrate the Device Identifier component into your Android project using either the native AAR or component-based method, then retrieve the unique device ID (UTDID) from the SDK.
Prerequisites
For native AAR integration, complete the steps in Add mPaaS to your project.
For component-based integration, complete the component-based connection flow.
Add the SDK
Native AAR method
Use Component Management (AAR) to install the Device Identifier component. For instructions, see AAR Component Management.
Component-based method
In your Portal and Bundle projects, use Component Management to install the Device Identifier component. For instructions, see Manage component dependencies.
Get the device ID
Call getUtdid to retrieve the unique device ID (UTDID) generated by the SDK.
UTDevice
/**
* Gets the generated unique device ID.
*
*
* @return The unique device ID.
*/
public static String getUtdid(Context context);
该文章对您有帮助吗?