{"__v":1,"_id":"57da851e2bb38f0e00ef417f","category":{"__v":26,"_id":"55a4ff5b2e70c0250038050f","pages":["55a4ff7d750a9a23005332af","55a4ff8b750a9a23005332b1","55a4ff9b750a9a23005332b3","55a60bfcaaf9cf1900114efb","55a6184880c8a30d00b32526","55a61ba780c8a30d00b32532","55a61c97aaf9cf1900114f40","55a61ea9aaf9cf1900114f48","55a6206580c8a30d00b32544","55a64277aaf9cf1900114fc2","55a694d1aaf9cf1900115102","55a6a23eaaf9cf19001151e2","55a6a9b389c9da1900e2a41d","55a6aba45f88a70d0065b255","55a90687c8bd450d000dd157","55af84f3aa902f1700300daa","55afa3e3902fd51700f5f858","55b0cc5cb3171b3700b153fa","56015bdc3aa0520d00da0ced","5603fe3490ee490d004404c2","5633dd18d28a340d004004f5","56448c697a8cb50d00a3ea3f","56d7a2ec5208281500a2506c","56d859b8b159f10b00304577","56d9822add90610b002708a1","56ef44c6e8d6fa17006f244f"],"project":"5540ce1b31827a0d007ab1cc","version":"5540ce1c31827a0d007ab1cf","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-14T12:23:55.603Z","from_sync":false,"order":2,"slug":"features","title":"Features"},"parentDoc":null,"project":"5540ce1b31827a0d007ab1cc","user":"55b8b82fdec1c9210013cfa1","version":{"__v":31,"_id":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","createdAt":"2015-04-29T12:27:08.390Z","releaseDate":"2015-04-29T12:27:08.390Z","categories":["5540ce1c31827a0d007ab1d0","5540d91bbb9e762d00f594ad","5540e5f131827a0d007ab212","5540e5febb9e762d00f594d3","5540e61331827a0d007ab213","5540e6195cf9682100d61afa","5540e62631827a0d007ab214","5540e63031827a0d007ab215","5540e63531827a0d007ab216","5540e63e5cf9682100d61afc","5540e6445cf9682100d61afd","5540e64a5cf9682100d61afe","55a4ff5b2e70c0250038050f","55acb28318eefd0d0071d504","55ae1abe8576b92300291c80","55ae453ef302af23000ac109","55af586d555b900d0036d296","55af91dac8a85321007a53c3","55b9fee204775a2f00628071","55b9ff0e04775a2f00628072","55b9ff4604775a2f00628073","55b9ff5fd72d1e1900276a38","55b9ff7f04775a2f00628074","55b9ff90eb08801900f833e5","55b9ffa5d72d1e1900276a39","55b9ffca04775a2f00628075","55b9fffdd72d1e1900276a3a","56bc2f033ee9e70d008b46af","56c2f6efbbf9ec2d00e0fe4f","57595bbb18760817001e8bbe","57d8d9793916800e003dde53"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-15T11:25:18.388Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":11,"body":"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**.\n\nThere are two ways it can be done: **manual** and **automatic**.\n\nAfter 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.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Adding test devices manually\"\n}\n[/block]\nTo register Test Device you need to get **Device Push Token** (*taken from the successful `/registerDevice` call*).\nThen paste it to the *Add Test Device* form, give this device a name and add device language.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/584ae57-Pushwoosh.png\",\n        \"Pushwoosh.png\",\n        1678,\n        478,\n        \"#dcdcdc\"\n      ],\n      \"caption\": \"Adding test device manually\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Adding test devices automatically\"\n}\n[/block]\nTo 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.\n\nAll you have to do is to add this special Deep Link to AndroidManifest.xml / Info.plist. Easy, isn't it?\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Android\"\n}\n[/block]\n**1.** [Integrate Pushwoosh SDK](http://docs.pushwoosh.com/docs/android-sdk-fragments) with your application.\n\n**2.** Add **DeepLinkActivity** to your AndroidManifest.xml:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<activity\\n          android:name=\\\"com.pushwoosh.DeepLinkActivity\\\"\\n          android:theme=\\\":::at:::android:style/Theme.Translucent.NoTitleBar\\\" >\\n  <intent-filter>\\n    <action android:name=\\\"android.intent.action.VIEW\\\" />\\n    <category android:name=\\\"android.intent.category.DEFAULT\\\" />\\n    <category android:name=\\\"android.intent.category.BROWSABLE\\\" />\\n\\n    <data android:scheme=\\\"pw-YOUR_PUSHWOOSH_APP_ID\\\" />\\n  </intent-filter>\\n</activity>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\nDon't forget to replace *YOUR_PUSHWOOSH_APP_ID* in the xml above with your Pushwoosh App Id.\nExample: *<data android:scheme=\"pw-379F1-4704D\" />*\n\n**3.** Launch application to subscribe for push notifications. \n\n**4.** Scan the QR Code in **Test Devices** form using any appropriate QR Code scanner app&#42;. A toast message will appear indicating the status of test device registration.\n\n&#42; – most of the QR code scanning apps handle such deeplinks properly, here are just a few of them:\n- [QR & Barcode Scanner, Gamma Play](https://play.google.com/store/apps/details?id=com.gamma.scan)\n- [QR & Barcode Scanner, Maker, AppSourceHub](https://play.google.com/store/apps/details?id=qrcode.scanner.qrmaker)\n- [QR Code Scanner & Generator, McCart](https://play.google.com/store/apps/details?id=com.qrcode.qrscanner) \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"iOS\"\n}\n[/block]\n**1.** [Integrate Pushwoosh SDK](http://docs.pushwoosh.com/docs/native-ios-sdk) with your application.\n\n**2.** Add *pw-YOUR_PUSHWOOSH_APP_ID* URL scheme to the Info.plist file:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<key>CFBundleURLTypes</key>\\n<array>\\n  <dict>\\n    <key>CFBundleTypeRole</key>\\n    <string>Editor</string>\\n    <key>CFBundleURLName</key>\\n    <string>com.pushwoosh.scheme</string>\\n    <key>CFBundleURLSchemes</key>\\n    <array>\\n      <string>pw-YOUR_PUSHWOOSH_APP_ID</string>\\n    </array>\\n  </dict>\\n</array>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/f8fc900-PushNotificationsApp-Info_plist__Edited.png\",\n        \"PushNotificationsApp-Info_plist_—_Edited.png\",\n        1196,\n        258,\n        \"#282d3d\"\n      ],\n      \"caption\": \"Info.plist\"\n    }\n  ]\n}\n[/block]\nDon't forget to replace *YOUR_PUSHWOOSH_APP_ID* in the xml above with your Pushwoosh App Id.\nExample: *pw-379F1-4704D*\n\n**3.** Launch application to subscribe for push notifications.\n\n**4.** Scan the QR Code in **Test Devices** form using any appropriate QR Code scanner.","excerpt":"","slug":"test-devices","type":"basic","title":"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. [block:api-header] { "type": "basic", "title": "1. Adding test devices manually" } [/block] 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. [block:image] { "images": [ { "image": [ "https://files.readme.io/584ae57-Pushwoosh.png", "Pushwoosh.png", 1678, 478, "#dcdcdc" ], "caption": "Adding test device manually" } ] } [/block] [block:api-header] { "type": "basic", "title": "2. Adding test devices automatically" } [/block] 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 / Info.plist. Easy, isn't it? [block:api-header] { "type": "basic", "title": "Android" } [/block] **1.** [Integrate Pushwoosh SDK](http://docs.pushwoosh.com/docs/android-sdk-fragments) with your application. **2.** Add **DeepLinkActivity** to your AndroidManifest.xml: [block:code] { "codes": [ { "code": "<activity\n android:name=\"com.pushwoosh.DeepLinkActivity\"\n android:theme=\"@android:style/Theme.Translucent.NoTitleBar\" >\n <intent-filter>\n <action android:name=\"android.intent.action.VIEW\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n <category android:name=\"android.intent.category.BROWSABLE\" />\n\n <data android:scheme=\"pw-YOUR_PUSHWOOSH_APP_ID\" />\n </intent-filter>\n</activity>", "language": "xml" } ] } [/block] 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&#42;. A toast message will appear indicating the status of test device registration. &#42; – most of the QR code scanning apps handle such deeplinks properly, here are just a few of them: - [QR & Barcode Scanner, Gamma Play](https://play.google.com/store/apps/details?id=com.gamma.scan) - [QR & Barcode Scanner, Maker, AppSourceHub](https://play.google.com/store/apps/details?id=qrcode.scanner.qrmaker) - [QR Code Scanner & Generator, McCart](https://play.google.com/store/apps/details?id=com.qrcode.qrscanner) [block:api-header] { "type": "basic", "title": "iOS" } [/block] **1.** [Integrate Pushwoosh SDK](http://docs.pushwoosh.com/docs/native-ios-sdk) with your application. **2.** Add *pw-YOUR_PUSHWOOSH_APP_ID* URL scheme to the Info.plist file: [block:code] { "codes": [ { "code": "<key>CFBundleURLTypes</key>\n<array>\n <dict>\n <key>CFBundleTypeRole</key>\n <string>Editor</string>\n <key>CFBundleURLName</key>\n <string>com.pushwoosh.scheme</string>\n <key>CFBundleURLSchemes</key>\n <array>\n <string>pw-YOUR_PUSHWOOSH_APP_ID</string>\n </array>\n </dict>\n</array>", "language": "xml" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/f8fc900-PushNotificationsApp-Info_plist__Edited.png", "PushNotificationsApp-Info_plist_—_Edited.png", 1196, 258, "#282d3d" ], "caption": "Info.plist" } ] } [/block] 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.