Mobile devices come with an IMEI (International Mobile Equipment Identity) and a MEID (Mobile Equipment Identifier). You can use an Android device’s IMEI and MEID for attribution in certain markets. To use this feature, you first need to complete the required steps in your Adjust dashboard. Once you have completed the steps, you can use this plugin.
The IMEI plugin provides the IMEI and MEID values of a device. The SDK will continue to use other identifiers as well as the IMEI and MEID.
Before you use this plugin, make sure to follow the get started guide and integrate the Adjust SDK into your app.
Add the plugin to your app
To use the IMEI plugin, you need to add it to your project. There are two ways to add the plugin:
- Download the JAR from Adjust’s GitHub releases page.
- Add the dependency to your
build.gradle
file.
Add permissions
Ensure the following permission is present in your AndroidManifest.xml
file. Add it if it’s not.
Update Proguard settings
If your app doesn’t target the Google Play Store, you don’t need to add all the rules set out in the get started guide. You can remove rules related to Google Play Services and install referrer libraries. You only need to keep the rules that apply to the Adjust SDK.
Use the plugin
Once you’ve set up the plugin, you can gather the device’s IMEI and MEID. To do this, call the AdjustImei.readImei
method before starting the Adjust SDK.
If you want to prevent the SDK from reading the IMEI and MEID, call the AdjustImei.doNotReadImei
method.