To send a test notification to your web browser on Android, you can either use the Custom User ID of the user you want to send the test to (in which case, skip to step 3), or locate your installation ID in case you don't share any Custom User ID with Batch.

Here is how to proceed to locate your installation ID on Android:

1. Remote Debug your Android device

Remote Debugging lets you inspect a page running on an Android device from your own machine.

  • First, enable Debugging and Developer options on your Android as described in this documentation.

  • Once your Android device is connected, Open Chrome on your machine.

  • Open a new tab, past the following URL: chrome://inspect/

  • In Remote devices > Settings enable "Discover USB Devices"

  • Your device should be visible in the list of devices. Open your website's URL and click on "Inspect". This should open a new window with the developers tools tab open.

2. Locate your installation ID

Once you have the developer tools open, click the "Console" tab, paste the following code:

"batchSDK"in window?window.batchSDK(function(a){a.getInstallationID().then(function(a){window.prompt("Here is your Batch Installation ID",a)})}):window.alert("Batch SDK is not running");

Batch's SDK will return your Installation ID on your Android device :

3. Sending a test notification

Using your Custom User ID or your Installation ID, you can send a test notification in 3 different ways from the dashboard as described in the 3rd section of this article.

Did this answer your question?