# Android Device Id Guide

## Pushlink Start

As you may have noticed, the last Pushlink.start parameter is "**yourDeviceId**".

```java
PushLink.start(this, R.mipmap.ic_launcher, "yourApiKey", "yourDeviceID");
```

It's up to you to identify the device.

## **Disclaimer**

There is no default and 100% guaranteed way to retrieve the Device ID on Android. It depends on the OS version, device brand, etc. That's why Pushlink externalizes the id generation.

However, Pushlink is designed for enterprise apps, and the developers usually control which types of Devices and OS the application will run. Don't use an ID that is changed after every uninstall/install. Try to use a long-live ID. Think and create your strategy.

## Must read

* <https://developer.android.com/training/articles/user-data-ids.html>
* <https://proandroiddev.com/how-to-generate-android-unique-id-38362794e1a8>
* <http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id>

## **What should I be alert?**

Be careful with non-certified ROMs.

* Fake IMEI like '004999010640000'.
* Fake Settings.Secure.ANDROID\_ID like '9774d56d682e549c'.

Be careful with Android releases. They frequently change permissions and behaviors related to device identifiers.

## **What happens if I set the same ID on different devices?**

Don't do that. You will not be able to manage your installations properly. This will create all sorts of problems.

## **What happens if my device ID changes frequently?**

One real-life installation will be registered many times, giving you an unreal number of managed devices.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pushlink.com/android-device-id-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
