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. Locate your Installation ID from your Android device

This is the easiest way to locate your Installation ID, directly from your Android phone.

  1. Go to your website in the Chrome browser of your smartphone (it is important to use Google Chrome to find the ID)

  2. Type in the search bar: javascript: (do not paste it)

  3. Then type in or paste the following text: batchSDK('ui.showPublicIdentifiers')

  4. Make sure that the following text is fully written in the search bar:

    javascript:batchSDK('ui.showPublicIdentifiers') ; then validate.

  5. A window will pop up, with information such as your Installation ID

2. 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, and paste 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.

Locate your installation ID

Once you have the developer tools open, click the "Console" tab, and 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");

3. Your Installation ID is displayed on your Android device:

4. 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?