Integrate with Android

更新时间:
复制 MD 格式

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

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);