Use the Adjust Android SDK to measure uninstalls and reinstalls. Adjust sends silent Firebase Cloud Messaging (FCM) messages to the app’s push token to check whether the app is installed.
Before you begin
Requirements
- Add Firebase to your Android project
- Admin, Editor, or Custom Editor permissions
Connect Google FCM to Adjust
To let Adjust send silent messages through FCM HTTP v1, create a service-account JSON key.
Google Cloud console
1. Create a custom role for Adjust Uninstall and Reinstall Measurement
- Access your Google Cloud Console.
- Select the Google Cloud project associated with your Firebase project.
- Search for IAM & Admin.
- From the side menu, select Roles.
- Select + Create Role.
- Enter the following details:
- Title: Adjust Uninstall
- ID: adjust_uninstall
- Role launch stage: General Availability
- Select + Add Permissions.
- In the Enter property name or value field, enter
cloudmessaging.messages.createand select it from the search results. - Check the cloudmessaging.messages.create option and select Add.
- Select Create.
2. Create a service account
- From the side menu, select Service Accounts.
- Select + Create Service Account.
- In the Service account name field, enter
Adjust Uninstall Service Account. - Select Create and Continue.
- Select the Select a role dropdown. Enter
Adjust Uninstalland select it from the search results. - Select Continue.
- Select Done.
3. Generate and download the private key
- Select the newly created service account. The format looks like this:
adjust-uninstall-service-account@test3-55065.iam.gserviceaccount.com. - Select the Keys tab.
- Select Add Key > Create new key.
- Select JSON and then Create. The private key is downloaded as a JSON file to your computer.
In the Adjust dashboard
Now that you have the FCM HTTP v1 service-account JSON key, enable Uninstall and reinstall measurement in your app configuration in AppView:
- Select the Platforms tab.
- Select Edit.

- Under Advanced settings, find the Record uninstall and reinstall data option.

- Select Add connection. A modal will open prompting you to add a new connection between Adjust and Google FCM.

- Fill in the required information, including the FCM HTTP v1 service-account JSON key you generated. The Partner and Services fields are automatically filled in.
- Select Connect.
- Review your app’s settings and select Save.
Integrate with the Adjust SDK
Add Firebase Messaging
Follow Firebase’s Android setup to configure your project and add Firebase Messaging. With the Firebase Android BoM, the app module’s Gradle dependencies include:
Register your FirebaseMessagingService in the manifest:
<service android:name=".MyFirebaseMessagingService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter></service>Send the current token
Request the current FCM token when the app opens and pass it to Adjust as soon as it becomes available. You can call Adjust.setPushToken before or after Adjust.initSdk.
Handle token changes and messages
Forward new tokens to Adjust. Override onMessageReceived to skip handling for Adjust’s silent uninstall check, then handle other FCM messages as usual:
Test the integration
Use a debug or release build for testing, but initialize Adjust with AdjustConfig.ENVIRONMENT_PRODUCTION. Devices whose last activity was in the sandbox environment are excluded from uninstall checks.
To test uninstall measurement:
- Install the app on your physical test device or emulator.
- Open the app.
- Open Adjust’s Testing Console.
- Enter your device ID and select View device data.
- Under the App information section:
- The Install state should show Installed.
- There should be a value for Push token.
- Uninstall the app.
- Check the Testing Console after the next daily uninstall check. Under App information, the Install state should show Uninstalled once the uninstall is detected. Push notification services may report an uninstall up to a week after the last session.
The state change from Installed to Uninstalled ensures that the Uninstall and Reinstall measurement feature works correctly. However, if you would also like to test reinstall measurement, follow the next steps:
- Reinstall the debug build or release build on your physical test device or emulator.
- Open the app.
- After Adjust records the new session, check the Testing Console again. Under App information, the Install state should show Reinstalled.
Troubleshooting
Check these issues if the test does not produce the expected install state:
- Sandbox environment: Uninstall and reinstall measurement requires
AdjustConfig.ENVIRONMENT_PRODUCTIONfor the test install. Check the environment passed toAdjustConfig. - Missing push token: If the Testing Console shows no push token, check Firebase Messaging setup and the code that passes the token to Adjust.
- FCM HTTP v1 credentials: Check that the service-account key belongs to the correct Firebase project and that its details were entered correctly in Adjust Suite. If the issue persists, contact your Technical Account Manager or support@adjust.com with the device’s push token so they can inspect Google’s API response.