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
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:
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.
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.