All Collections
Getting Started
Testing the Integration
How can I test the integration on Android?
How can I test the integration on Android?

Follow this guide to make sure Batch's SDK is integrated correctly before going live on the PlayStore.

Claire avatar
Written by Claire
Updated over a week ago

There are several points you should check to make sure you will be able to use Batch at its full potential:

1. SDK version & production environment 

SDK version

First and foremost, make sure you are using the latest version of Batch SDK by checking our Android changelog.

Switch to the Live API key

You should only use the Dev API key for development purposes. 

Make sure you switch to the Live API key before releasing a new version of your app to the store. Find the right API key from Batch's dashboard > Settings > General and change it in your code (more information here).

2. Small icon support

What is the small icon?
The small icon is the icon Android displays in your notification.

How to test the integration?

Simply send a notification to your device to see if the small icon is displayed correctly. If you used a coloured small icon, Android will display it as a white square/circle except on Samsung devices, where the icon will be displayed correctly:

🚧 Don't know how to send a test notification to your device? Follow the steps described in our guide: how to send a test push to my device?

How to fix the issue?

You will need to set a valid small icon. It should be opaque white, using only the alpha channel and 24x24dp (more information here). You can also set an accent colour for your small icon (more information here).

3. In-App messages display 

What are In-App messages?

In-App messages are messages displayed inside your app. You can trigger an In-App message when users open your app, perform a specific action or as landing pages after opening a push notification.

How to test the integration?

Go to Settings > Themes. Pick a theme or create a new one (more information here). Select your device token, then click the "Preview" button. The In-App message should be displayed correctly, ideally after your splash screen.

How to fix the issue?

Batch's SDK tries to display the In-App message as soon as possible. This can cause display issues as other elements of the app (e.g. ad, loader, splash screen, etc) may close the In-App message or prevent Batch's SDK from displaying it.

You can avoid these issues by using the "Do Not Disturb" (DnD) mode. It allows you to tell Batch to hold on to a mobile landing for you and resume the In-App display once the app is fully loaded. You will find more information here: DnD mode.

4. Custom data collection

What kind of custom data can I collect from the SDK?

In addition to the data the SDK collects natively, you can collect additional data to improve your segmentation, personalise your messages or trigger In-App messages. Batch allows you to:

How to test the integration?

Use the debug tool (Settings → Debug) to find your most recent install, based on:

  • A GAID, in case the app shares it with Batch's SDK.

  • An Installation ID, which is an anonymous ID generated by Batch.

  • A custom user ID, should be the unique user ID you are sending to Batch from the SDK.

The debug tool shows all the native and custom data we have on your most recent installs:

  • Custom ID: This field shouldn't be empty if you are sending it to Batch and are logged into the app. Make sure that ID disappears after your log out. 

  • Push token: This field should not be empty on Android. Double-check your logs to see if the SDK gives you more information on the issue.

  • Attributes/events: Your attributes and events will appear in the right panel of the debug tool. Make sure important attributes are sent to Batch in the right format (e.g. date, string, boolean, etc) and at the right moment (e.g. on the first start of the app and/or when a value changes etc). Events will appear as soon as you perform the tracked action in the app.

  • Last location: In case you share with Batch the most recent location of your user, you should see a latitude/longitude in the right panel of the debug tool.

🚧 Optional: Implement Batch debugger

The debug view is a UI with multiple debug features, allowing you to see the native and custom data attached to your installation. You can also see the list of In-App campaigns already stored on your device.

This is useful for development purposes and for internal uses only, especially if your team cannot use an advertising or a custom user id to find their device in the debug tool and send test notifications to their device.

Here is how you start the debug activity:

public static void startDebugActivity(Context context)

🚧 Optional: Display the installation ID

To ease the debug, our clients usually display the Installation ID somewhere in their app (e.g. On a page of the app settings). That installation ID can safely be exposed to your end users, who can then give it back to you if they are experiencing push trouble with their app.

You can find the Installation ID of a device by calling: 

Batch.User.getInstallationID();

💡 Note: From version 1.18 of our SDK, Batch implements the "Find my installation" feature. Batch will copy the Installation ID to the clipboard when the application appears in the foreground 4 times within 20 seconds. Read more here.

Need more help?

If you have any questions, don't hesitate to ping us at support@batch.com, or directly on the live chat!


This article belongs to Batch's FAQ. Need more help? Find insightful articles, documentation, case & market studies, guides, and even more in our website's Resources section on batch.com and our blog.

Did this answer your question?