Add test push devices
You can use Test Devices to preview how push notifications look on a device before sending them to the app users. In order to do that, you need to register your device (with your app installed) as a Test Device.
To add a test device:
- Navigate to the Test devices section in your Pushwoosh account.
- Click the Add Device dropdown button in the top-right corner and select Push.
You can add a push test device using one of two methods: Auto-configuration with QR code or manual configuration.
Adding test devices automatically
This method is suitable only for iOS and Android devices.
- In the Test Devices section, click Add Device and select Push.
- Scan the QR code that appears in the popup. This will generate a deep link that the Pushwoosh SDK can parse to automatically register your device as a test device.
- Add the deep link to the app configuration:
- For Android: Add it to the
AndroidManifest.xml
file. - For iOS: Add it to the
Info.plist
file.
For more details, follow the instructions for Android and iOS in the Implementation section.
Adding test devices manually
If you prefer to register a test device manually, follow these steps:
- Obtain the Hardware ID (HWID) of the device from a successful
/registerDevice
API call. - Fill in the required fields:
- Device Name: A descriptive name for the test device (e.g., “John’s Android”).
- Device HWID: The unique hardware ID of the device.
- Device Type: Select the platform (e.g., iOS, Android, Web).
- Description (Optional): Add any notes or details about the device for reference.
- Click Save to register the test device.
Once registered, the test device will be available in the Test Devices section.
Implementation
Android
1. Integrate Pushwoosh SDK with your application.
2. Add DeepLinkActivity to your AndroidManifest.xml:
Don’t forget to replace YOUR_PUSHWOOSH_APP_ID in the xml above with your Pushwoosh App ID.
Example: <data android:scheme=“pushwoosh-ABCDE-EDCBA” />
3. Launch the application to subscribe for push notifications.
4. Scan the QR Code in Test Devices form using any appropriate QR Code scanner app*. A toast message will appear indicating the status of the test device registration.
* – most of the QR code scanning apps handle such deep links properly, here are just a few of them:
iOS
1. Integrate Pushwoosh SDK with your application.
2. Add pushwoosh-YOUR_PUSHWOOSH_APP_ID URL scheme to the Info.plist file:
Don’t forget to replace YOUR_PUSHWOOSH_APP_ID in the XML above with your Pushwoosh App ID.
Example: pushwoosh-ABCDE-EDCBA
3. Launch the application to subscribe for push notifications.
4. Scan the QR Code in the Test Devices form using any appropriate QR Code scanner.