Skip to main content
All CollectionsGetting startedTroubleshooting
How to check Batch logs on Android?
How to check Batch logs on Android?

Follow this guide to see what Batch SDK is reporting and get more information on Batch integration in your app.

Alexandre avatar
Written by Alexandre
Updated over a year ago

It is possible to view the Batch SDK logs for a given device. This allows you to:

  • Easily retrieve your installation ID and your token

  • Test that direct opens are detected by Batch

  • Check if the SDK or the app are reporting errors

Prerequisite

Please note that these steps are only valid for a Mac.

In order to access the logs of a device, you need:

  • The 'Developer Options' menu on your device to be enabled (activation mode depending on the device model)

  • The device to be connected to the computer

  • The USB debug mode is to be enabled from the phone settings. To do this, go to Developer options → USB Debugging.

You also need to install adb via Homebrew:

  • Install Homebrew:

You can follow the steps described on their website.

  • Install Android tools:

brew install homebrew/cask/android-platform-tools

⚠️ Please note that brew installs only works for Macs. Instructions for Windows or Linux should be available online.

Commands

Display Batch logs

Go to the computer terminal.

Type the following line to watch the logcat:

adb logcat |grep Batch

This will allow ADB to output the logs from the SDK to the computer terminal, allowing you to see your installation ID and your push token when you start the app:

Get more detailed logs

You can also switch to verbose mode:

adb shell setprop log.tag.BatchInternal VERBOSE

You will then need to restart the app.

This will allow you to see advanced logs, like the display of an In-App message, etc.

⚠️ These logs are deliberately very verbose and therefore there can be a lot of them.

Testing your integration

You can follow this guide to test your integration and check what the SDK is logging at the same time.


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?