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

There are two ways it can be done: manual and automatic.

After you have added your test device, you can use the "Test Woosh" button in the Send Push form, and the notification will be sent only to registered test devices.

Adding test devices manually

To register Test Device you need to get Device Push Token (taken from the successful /registerDevice call).
Then paste it to the Add Test Device form, give this device a name and add device language.

Adding test device manually

Adding test device manually

Adding test devices automatically

To make it simpler there is a QR Code that can be scanned on iOS and Android. This QR Code contains a Deep Link, that Pushwoosh SDK (which is integrated in your app) can parse and register your device as a test one automatically.

All you have to do is to add this special Deep Link to AndroidManifest.xml (Android) and Info.plist (iOS).

Use QR readers right!

Many QR readers will open a link in their own "webview". Make sure to open the scanned link in the native browser! (Usually there's a button in many QR readers to open the link in a browser).

Implementation

Android

1. Integrate Pushwoosh SDK with your application.

2. Add DeepLinkActivity to your AndroidManifest.xml:

<activity
          android:name="com.pushwoosh.DeepLinkActivity"
          android:theme="@android:style/Theme.Translucent.NoTitleBar" >
  <intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />

    <data android:scheme="pw-YOUR_PUSHWOOSH_APP_ID" />
  </intent-filter>
</activity>

Don't forget to replace YOUR_PUSHWOOSH_APP_ID in the xml above with your Pushwoosh App Id.
Example: <data android:scheme="pw-379F1-4704D" />

3. Launch 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 test device registration.

* – most of the QR code scanning apps handle such deeplinks properly, here are just a few of them:

iOS

1. Integrate Pushwoosh SDK with your application.

2. Add pw-YOUR_PUSHWOOSH_APP_ID URL scheme to the Info.plist file:

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLName</key>
    <string>com.pushwoosh.scheme</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>pw-YOUR_PUSHWOOSH_APP_ID</string>
    </array>
  </dict>
</array>
Info.plist

Info.plist

Don't forget to replace YOUR_PUSHWOOSH_APP_ID in the xml above with your Pushwoosh App Id.
Example: pw-379F1-4704D

3. Launch application to subscribe for push notifications.

4. Scan the QR Code in Test Devices form using any appropriate QR Code scanner.

Test Devices