{"_id":"55a90687c8bd450d000dd157","parentDoc":null,"__v":13,"version":{"_id":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","__v":31,"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"},"category":{"_id":"55b9ff0e04775a2f00628072","__v":0,"project":"5540ce1b31827a0d007ab1cc","version":"5540ce1c31827a0d007ab1cf","pages":[],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-30T10:40:14.194Z","from_sync":false,"order":17,"slug":"adobe-air","title":"Adobe Air"},"user":"55a5003a750a9a23005332b6","project":"5540ce1b31827a0d007ab1cc","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-17T13:43:35.478Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Supports iOS, Android, Amazon\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"The plugin needs AIR SDK version 18.0 or above.\"\n}\n[/block]\n[**Download SDK** ](https://github.com/Pushwoosh/pushwoosh-adobe-air/tree/master/ANE-Pushwoosh)\n[**Sample Project**](https://github.com/Pushwoosh/pushwoosh-adobe-air/tree/master/PushNotificationsSample)\n[**SDK API Docs**](https://rawgit.com/Pushwoosh/pushwoosh-adobe-air/master/Documentation/files/PushNotification-as.html) \n\nTo integrate Pushwoosh push notifications into your Adobe Air application follow these simple steps:\n\n1. Grab [PushNotifications.ane](https://github.com/Pushwoosh/pushwoosh-adobe-air/blob/master/ANE-Pushwoosh/PushNotification.ane) and add it to your project.\n\n2. Add the following code to your application start routine:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// set push notification callbacks for the plugin\\nvar pushwoosh:PushNotification = PushNotification.getInstance();\\npushwoosh.addEventListener(PushNotificationEvent.PERMISSION_GIVEN_WITH_TOKEN_EVENT, onToken);\\npushwoosh.addEventListener(PushNotificationEvent.PERMISSION_REFUSED_EVENT, onError);\\npushwoosh.addEventListener(PushNotificationEvent.PUSH_NOTIFICATION_RECEIVED_EVENT, onPushReceived);\\n \\n// important! Call this function when callbacks have been set. It triggers delivery of all pending push notifications.\\npushwoosh.onDeviceReady();\\n \\n// register for push\\npushwoosh.registerForPushNotification();\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nThe handler functions are straightforward:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"public function onToken(e:PushNotificationEvent):void{\\n    trace(\\\"\\\\n TOKEN: \\\" + e.token + \\\" \\\");\\n}\\n \\npublic function onError(e:PushNotificationEvent):void{\\n    trace(\\\"\\\\n TOKEN: \\\" + e.errorMessage+ \\\" \\\");\\n}\\n \\npublic function onPushReceived(e:PushNotificationEvent):void{\\n    trace(\\\"\\\\n TOKEN: \\\" + JSON.stringify(e.parameters) + \\\" \\\");\\n}\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n3. Now configure your **app.xml**. Replace **PUSHWOOSH_APP_ID** with your actual Pushwoosh App ID. For Android replace **GOOGLE_PROJECT_NUMBER** with your **Google Project Number** and **PACKAGE_NAME** with your **Android package name**:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<iPhone>\\n    <InfoAdditions>\\n        <![CDATA[\\n            <key>Pushwoosh_APPID</key>\\n            <string>PUSHWOOSH_APP_ID</string>\\n        ]]>\\n    </InfoAdditions>\\n    <Entitlements>\\n        <![CDATA[\\n            <key>aps-environment</key>\\n            <string>development</string>\\n        ]]>\\n    </Entitlements>  \\n</iPhone>\\n<android>\\n    <manifestAdditions><![CDATA[\\n        <manifest android:installLocation=\\\"auto\\\">\\n        \\n            <application>\\n                <meta-data android:name=\\\"PW_APPID\\\" android:value=\\\"PUSHWOOSH_APP_ID\\\" />\\n                <meta-data android:name=\\\"PW_PROJECT_ID\\\" android:value=\\\"\\\\ GOOGLE_PROJECT_NUMBER\\\" />\\n                <meta-data android:name=\\\"PW_BROADCAST_PUSH\\\" android:value=\\\"true\\\" />\\n            \\n                <activity android:name=\\\"com.pushwoosh.richpages.RichPageActivity\\\" />\\n                <activity android:name=\\\"com.pushwoosh.MessageActivity\\\" />\\n                <activity android:name=\\\"com.pushwoosh.PushHandlerActivity\\\" />\\n\\n                <receiver\\n                    android:name=\\\"com.google.android.gms.gcm.GcmReceiver\\\"\\n                    android:exported=\\\"true\\\"\\n                    android:permission=\\\"com.google.android.c2dm.permission.SEND\\\" >\\n                    <intent-filter>\\n                        <action android:name=\\\"com.google.android.c2dm.intent.RECEIVE\\\" />\\n                        <category android:name=\\\"PACKAGE_NAME\\\" />\\n                    </intent-filter>\\n                </receiver>\\n\\n                <service\\n                    android:name=\\\"com.pushwoosh.GCMListenerService\\\"\\n                    android:exported=\\\"false\\\">\\n                    <intent-filter>\\n                        <action android:name=\\\"com.google.android.c2dm.intent.RECEIVE\\\"/>\\n                    </intent-filter>\\n                </service>\\n\\n                <service\\n                    android:name=\\\"com.pushwoosh.GCMInstanceIDListenerService\\\"\\n                    android:exported=\\\"false\\\">\\n                    <intent-filter>\\n                        <action android:name=\\\"com.google.android.gms.iid.InstanceID\\\"/>\\n                    </intent-filter>\\n                </service>\\n\\n                <service\\n                    android:name=\\\"com.pushwoosh.GCMRegistrationService\\\"\\n                    android:exported=\\\"false\\\">\\n                </service>\\n\\n                <service android:name=\\\"com.pushwoosh.location.GeoLocationService\\\" />\\n\\n                <receiver android:name=\\\"com.pushwoosh.local.AlarmReceiver\\\" />\\n                <receiver android:name=\\\"com.pushwoosh.local.BootReceiver\\\"\\n                          android:permission=\\\"android.permission.RECEIVE_BOOT_COMPLETED\\\"\\n                          android:enabled=\\\"true\\\">\\n                    <intent-filter>\\n                        <action android:name=\\\"android.intent.action.BOOT_COMPLETED\\\" />\\n                        <category android:name=\\\"android.intent.category.DEFAULT\\\" />\\n                    </intent-filter>\\n                </receiver>\\n\\n                <activity android:name=\\\"com.pushwoosh.nativeExtensions.PushActivity\\\">\\n                    <intent-filter>\\n                        <action android:name=\\\"PACKAGE_NAME.MESSAGE\\\"/>\\n                        <category android:name=\\\"android.intent.category.DEFAULT\\\"/>\\n                    </intent-filter>\\n                </activity>\\n            </application>\\n\\n            <uses-permission android:name=\\\"android.permission.ACCESS_NETWORK_STATE\\\"/>\\n            <uses-permission android:name=\\\"android.permission.READ_PHONE_STATE\\\"/>\\n             \\n             <!--library-->\\n             <uses-permission android:name=\\\"android.permission.READ_PHONE_STATE\\\"/>\\n             \\n             <!-- GCM connects to Google Services. -->\\n             <uses-permission android:name=\\\"android.permission.INTERNET\\\"/>\\n             \\n             <!-- GCM requires a Google account. -->\\n             <uses-permission android:name=\\\"android.permission.GET_ACCOUNTS\\\"/>\\n             \\n             <!-- Keeps the processor from sleeping when a message is received. -->\\n             <uses-permission android:name=\\\"android.permission.WAKE_LOCK\\\"/>\\n             \\n             <!--\\n              Creates a custom permission so only this app can receive its messages.\\n             \\n              NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,\\n                    where PACKAGE is the application's package name.\\n             -->\\n             <permission\\n                     android:name=\\\"PACKAGE_NAME.permission.C2D_MESSAGE\\\"\\n                     android:protectionLevel=\\\"signature\\\"/>\\n             <uses-permission\\n                     android:name=\\\"PACKAGE_NAME.permission.C2D_MESSAGE\\\"/>\\n             \\n             <!-- This app has permission to register and receive data message. -->\\n             <uses-permission\\n                     android:name=\\\"com.google.android.c2dm.permission.RECEIVE\\\"/>\\n             \\n             <!-- GCM requires Android SDK version 2.2 (API level 8) or above. -->\\n             <!-- The targetSdkVersion is optional, but it's always a good practice\\n                  to target higher versions. -->\\n             <uses-sdk android:minSdkVersion=\\\"8\\\" android:targetSdkVersion=\\\"16\\\"/>\\n\\n             <uses-permission android:name=\\\"android.permission.RECEIVE_BOOT_COMPLETED\\\"/>\\n                                \\n        </manifest>\\n        \\n    ]]></manifestAdditions>\\n    <colorDepth>16bit</colorDepth>\\n</android>\",\n      \"language\": \"xml\",\n      \"name\": \"iOS + Android\"\n    },\n    {\n      \"code\": \"<android>\\n    <manifestAdditions><![CDATA[\\n        <manifest android:installLocation=\\\"auto\\\">\\n            <application>\\n                <meta-data android:name=\\\"PW_APPID\\\" android:value=\\\"PUSHWOOSH_APP_ID\\\" />\\n                <meta-data android:name=\\\"PW_BROADCAST_PUSH\\\" android:value=\\\"true\\\" />\\n             \\n                <receiver\\n                        android:name=\\\"com.pushwoosh.MessageAlertReceiver\\\"\\n                        android:permission=\\\"com.amazon.device.messaging.permission.SEND\\\">\\n                    <intent-filter>\\n                        <action android:name=\\\"com.amazon.device.messaging.intent.RECEIVE\\\"/>\\n                        <action android:name=\\\"com.amazon.device.messaging.intent.REGISTRATION\\\"/>\\n                        <category android:name=\\\"PACKAGE_NAME\\\"/>\\n                    </intent-filter>\\n                </receiver>\\n\\n                <amazon:enable-feature android:name=\\\"com.amazon.device.messaging\\\" android:required=\\\"false\\\" />\\n\\n                <receiver android:name=\\\"com.pushwoosh.local.AlarmReceiver\\\" />\\n                <receiver android:name=\\\"com.pushwoosh.local.BootReceiver\\\"\\n                          android:permission=\\\"android.permission.RECEIVE_BOOT_COMPLETED\\\"\\n                          android:enabled=\\\"true\\\">\\n                    <intent-filter>\\n                        <action android:name=\\\"android.intent.action.BOOT_COMPLETED\\\" />\\n                        <category android:name=\\\"android.intent.category.DEFAULT\\\" />\\n                    </intent-filter>\\n                </receiver>\\n\\n                <activity android:name=\\\"com.pushwoosh.richpages.RichPageActivity\\\" />\\n                <activity android:name=\\\"com.pushwoosh.MessageActivity\\\" />\\n                <activity android:name=\\\"com.pushwoosh.PushHandlerActivity\\\" />\\n                <activity android:name=\\\"com.pushwoosh.nativeExtensions.PushActivity\\\">\\n                    <intent-filter>\\n                        <action android:name=\\\"PACKAGE_NAME.MESSAGE\\\"/>\\n                        <category android:name=\\\"android.intent.category.DEFAULT\\\"/>\\n                    </intent-filter>\\n                </activity>\\n                     \\n                <service android:name=\\\"com.pushwoosh.PushAmazonIntentService\\\"/>\\n                <receiver android:name=\\\"com.pushwoosh.local.AlarmReceiver\\\"></receiver>\\n\\n            </application>\\n \\n            <uses-permission android:name=\\\"android.permission.ACCESS_NETWORK_STATE\\\"/>\\n            <uses-permission android:name=\\\"android.permission.READ_PHONE_STATE\\\"/>\\n              \\n             <!-- ADM connects to Amazon Services. -->\\n             <uses-permission android:name=\\\"android.permission.INTERNET\\\"/>\\n              \\n             <!-- Keeps the processor from sleeping when a message is received. -->\\n             <uses-permission android:name=\\\"android.permission.WAKE_LOCK\\\"/>\\n              \\n             <!--\\n              Creates a custom permission so only this app can receive its messages.\\n              \\n              NOTE: the permission *must* be called PACKAGE.permission.RECEIVE_ADM_MESSAGE,\\n                    where PACKAGE is the application's package name.\\n             -->\\n             <permission\\n                     android:name=\\\"PACKAGE_NAME.permission.RECEIVE_ADM_MESSAGE\\\"\\n                     android:protectionLevel=\\\"signature\\\"/>\\n             <uses-permission\\n                     android:name=\\\"PACKAGE_NAME.permission.RECEIVE_ADM_MESSAGE\\\"/>\\n              \\n             <!-- This app has permission to register and receive data message. -->\\n             <uses-permission\\n                     android:name=\\\"com.amazon.device.messaging.permission.RECEIVE\\\"/>\\n              \\n             <!-- ADM requires Android SDK version 2.2 (API level 8 ) or above. -->\\n             <!-- The targetSdkVersion is optional, but it's always a good practice\\n                  to target higher versions. -->\\n             <uses-sdk android:minSdkVersion=\\\"8\\\" android:targetSdkVersion=\\\"16\\\"/>\\n                                 \\n        </manifest>\\n             \\n        ]]>\\n    </manifestAdditions>\\n    <colorDepth>16bit</colorDepth>\\n</android>\\n\",\n      \"language\": \"xml\",\n      \"name\": \"Amazon\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"iOS Important Info\",\n  \"body\": \"Please note that for **development builds** ( ones signed with iOS Development Certificates) the value for `aps-environment` should be **development** as in the example above. For **Ad-Hoc** or **AppStore** builds (ones signed with iOS Production Certificate) please use **production** value.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Android Important Info\",\n  \"body\": \"IMPORTANT! Project Number is an integer but prefix it with \\\"\\\\ \\\" as in the example above or the letter “A”. Ex: \\\"A1234567890\\\".\\n\\nNote that for debug builds Adobe Air automatically postfixes your package name with “.debug”. We recommend to use “Release” builds to prevent a lot of headache.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Amazon API Key\",\n  \"body\": \"Get the API KEY from Amazon according to the [Amazon guide](https://developer.amazon.com/sdk/adm/credentials.html).\\nFor a pre-release or “debug” version of your app, you must create an API Key and store it as the only data in a file named api_key.txt . **The api_key.txt file must be located inside the assets folder for your project.**\\nNote: ADM cannot recognize your API Key if it contains any spaces or line breaks.\\nFor a release or “production” version of your app, you may not need to create an API Key. Create an additional API key nly if you sign the release version of your app using your own certificate, must you create an additional API Key for the release version of your app. You don't need an extra API key if you let Amazon sign the app on your behalf.\"\n}\n[/block]\n4. Make sure you select “Package” checkbox on the “Native Extensions” pane in the settings. Also select the path to the latest iOS SDK as per screenshot below when exporting for iOS:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/BG2U17dQc6mbK4cuspd3_asdasdad.jpg\",\n        \"asdasdad.jpg\",\n        \"826\",\n        \"402\",\n        \"#89a4bd\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nThat’s it!","excerpt":"How to integrate Pushwoosh SDK into your Adobe AIR project","slug":"adobe-air","type":"basic","title":"Adobe AIR"}

Adobe AIR

How to integrate Pushwoosh SDK into your Adobe AIR project

[block:callout] { "type": "success", "title": "Supports iOS, Android, Amazon" } [/block] [block:callout] { "type": "warning", "title": "The plugin needs AIR SDK version 18.0 or above." } [/block] [**Download SDK** ](https://github.com/Pushwoosh/pushwoosh-adobe-air/tree/master/ANE-Pushwoosh) [**Sample Project**](https://github.com/Pushwoosh/pushwoosh-adobe-air/tree/master/PushNotificationsSample) [**SDK API Docs**](https://rawgit.com/Pushwoosh/pushwoosh-adobe-air/master/Documentation/files/PushNotification-as.html) To integrate Pushwoosh push notifications into your Adobe Air application follow these simple steps: 1. Grab [PushNotifications.ane](https://github.com/Pushwoosh/pushwoosh-adobe-air/blob/master/ANE-Pushwoosh/PushNotification.ane) and add it to your project. 2. Add the following code to your application start routine: [block:code] { "codes": [ { "code": "// set push notification callbacks for the plugin\nvar pushwoosh:PushNotification = PushNotification.getInstance();\npushwoosh.addEventListener(PushNotificationEvent.PERMISSION_GIVEN_WITH_TOKEN_EVENT, onToken);\npushwoosh.addEventListener(PushNotificationEvent.PERMISSION_REFUSED_EVENT, onError);\npushwoosh.addEventListener(PushNotificationEvent.PUSH_NOTIFICATION_RECEIVED_EVENT, onPushReceived);\n \n// important! Call this function when callbacks have been set. It triggers delivery of all pending push notifications.\npushwoosh.onDeviceReady();\n \n// register for push\npushwoosh.registerForPushNotification();", "language": "javascript" } ] } [/block] The handler functions are straightforward: [block:code] { "codes": [ { "code": "public function onToken(e:PushNotificationEvent):void{\n trace(\"\\n TOKEN: \" + e.token + \" \");\n}\n \npublic function onError(e:PushNotificationEvent):void{\n trace(\"\\n TOKEN: \" + e.errorMessage+ \" \");\n}\n \npublic function onPushReceived(e:PushNotificationEvent):void{\n trace(\"\\n TOKEN: \" + JSON.stringify(e.parameters) + \" \");\n}", "language": "javascript" } ] } [/block] 3. Now configure your **app.xml**. Replace **PUSHWOOSH_APP_ID** with your actual Pushwoosh App ID. For Android replace **GOOGLE_PROJECT_NUMBER** with your **Google Project Number** and **PACKAGE_NAME** with your **Android package name**: [block:code] { "codes": [ { "code": "<iPhone>\n <InfoAdditions>\n <![CDATA[\n <key>Pushwoosh_APPID</key>\n <string>PUSHWOOSH_APP_ID</string>\n ]]>\n </InfoAdditions>\n <Entitlements>\n <![CDATA[\n <key>aps-environment</key>\n <string>development</string>\n ]]>\n </Entitlements> \n</iPhone>\n<android>\n <manifestAdditions><![CDATA[\n <manifest android:installLocation=\"auto\">\n \n <application>\n <meta-data android:name=\"PW_APPID\" android:value=\"PUSHWOOSH_APP_ID\" />\n <meta-data android:name=\"PW_PROJECT_ID\" android:value=\"\\ GOOGLE_PROJECT_NUMBER\" />\n <meta-data android:name=\"PW_BROADCAST_PUSH\" android:value=\"true\" />\n \n <activity android:name=\"com.pushwoosh.richpages.RichPageActivity\" />\n <activity android:name=\"com.pushwoosh.MessageActivity\" />\n <activity android:name=\"com.pushwoosh.PushHandlerActivity\" />\n\n <receiver\n android:name=\"com.google.android.gms.gcm.GcmReceiver\"\n android:exported=\"true\"\n android:permission=\"com.google.android.c2dm.permission.SEND\" >\n <intent-filter>\n <action android:name=\"com.google.android.c2dm.intent.RECEIVE\" />\n <category android:name=\"PACKAGE_NAME\" />\n </intent-filter>\n </receiver>\n\n <service\n android:name=\"com.pushwoosh.GCMListenerService\"\n android:exported=\"false\">\n <intent-filter>\n <action android:name=\"com.google.android.c2dm.intent.RECEIVE\"/>\n </intent-filter>\n </service>\n\n <service\n android:name=\"com.pushwoosh.GCMInstanceIDListenerService\"\n android:exported=\"false\">\n <intent-filter>\n <action android:name=\"com.google.android.gms.iid.InstanceID\"/>\n </intent-filter>\n </service>\n\n <service\n android:name=\"com.pushwoosh.GCMRegistrationService\"\n android:exported=\"false\">\n </service>\n\n <service android:name=\"com.pushwoosh.location.GeoLocationService\" />\n\n <receiver android:name=\"com.pushwoosh.local.AlarmReceiver\" />\n <receiver android:name=\"com.pushwoosh.local.BootReceiver\"\n android:permission=\"android.permission.RECEIVE_BOOT_COMPLETED\"\n android:enabled=\"true\">\n <intent-filter>\n <action android:name=\"android.intent.action.BOOT_COMPLETED\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n </intent-filter>\n </receiver>\n\n <activity android:name=\"com.pushwoosh.nativeExtensions.PushActivity\">\n <intent-filter>\n <action android:name=\"PACKAGE_NAME.MESSAGE\"/>\n <category android:name=\"android.intent.category.DEFAULT\"/>\n </intent-filter>\n </activity>\n </application>\n\n <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>\n <uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>\n \n <!--library-->\n <uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>\n \n <!-- GCM connects to Google Services. -->\n <uses-permission android:name=\"android.permission.INTERNET\"/>\n \n <!-- GCM requires a Google account. -->\n <uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>\n \n <!-- Keeps the processor from sleeping when a message is received. -->\n <uses-permission android:name=\"android.permission.WAKE_LOCK\"/>\n \n <!--\n Creates a custom permission so only this app can receive its messages.\n \n NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,\n where PACKAGE is the application's package name.\n -->\n <permission\n android:name=\"PACKAGE_NAME.permission.C2D_MESSAGE\"\n android:protectionLevel=\"signature\"/>\n <uses-permission\n android:name=\"PACKAGE_NAME.permission.C2D_MESSAGE\"/>\n \n <!-- This app has permission to register and receive data message. -->\n <uses-permission\n android:name=\"com.google.android.c2dm.permission.RECEIVE\"/>\n \n <!-- GCM requires Android SDK version 2.2 (API level 8) or above. -->\n <!-- The targetSdkVersion is optional, but it's always a good practice\n to target higher versions. -->\n <uses-sdk android:minSdkVersion=\"8\" android:targetSdkVersion=\"16\"/>\n\n <uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>\n \n </manifest>\n \n ]]></manifestAdditions>\n <colorDepth>16bit</colorDepth>\n</android>", "language": "xml", "name": "iOS + Android" }, { "code": "<android>\n <manifestAdditions><![CDATA[\n <manifest android:installLocation=\"auto\">\n <application>\n <meta-data android:name=\"PW_APPID\" android:value=\"PUSHWOOSH_APP_ID\" />\n <meta-data android:name=\"PW_BROADCAST_PUSH\" android:value=\"true\" />\n \n <receiver\n android:name=\"com.pushwoosh.MessageAlertReceiver\"\n android:permission=\"com.amazon.device.messaging.permission.SEND\">\n <intent-filter>\n <action android:name=\"com.amazon.device.messaging.intent.RECEIVE\"/>\n <action android:name=\"com.amazon.device.messaging.intent.REGISTRATION\"/>\n <category android:name=\"PACKAGE_NAME\"/>\n </intent-filter>\n </receiver>\n\n <amazon:enable-feature android:name=\"com.amazon.device.messaging\" android:required=\"false\" />\n\n <receiver android:name=\"com.pushwoosh.local.AlarmReceiver\" />\n <receiver android:name=\"com.pushwoosh.local.BootReceiver\"\n android:permission=\"android.permission.RECEIVE_BOOT_COMPLETED\"\n android:enabled=\"true\">\n <intent-filter>\n <action android:name=\"android.intent.action.BOOT_COMPLETED\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n </intent-filter>\n </receiver>\n\n <activity android:name=\"com.pushwoosh.richpages.RichPageActivity\" />\n <activity android:name=\"com.pushwoosh.MessageActivity\" />\n <activity android:name=\"com.pushwoosh.PushHandlerActivity\" />\n <activity android:name=\"com.pushwoosh.nativeExtensions.PushActivity\">\n <intent-filter>\n <action android:name=\"PACKAGE_NAME.MESSAGE\"/>\n <category android:name=\"android.intent.category.DEFAULT\"/>\n </intent-filter>\n </activity>\n \n <service android:name=\"com.pushwoosh.PushAmazonIntentService\"/>\n <receiver android:name=\"com.pushwoosh.local.AlarmReceiver\"></receiver>\n\n </application>\n \n <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>\n <uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>\n \n <!-- ADM connects to Amazon Services. -->\n <uses-permission android:name=\"android.permission.INTERNET\"/>\n \n <!-- Keeps the processor from sleeping when a message is received. -->\n <uses-permission android:name=\"android.permission.WAKE_LOCK\"/>\n \n <!--\n Creates a custom permission so only this app can receive its messages.\n \n NOTE: the permission *must* be called PACKAGE.permission.RECEIVE_ADM_MESSAGE,\n where PACKAGE is the application's package name.\n -->\n <permission\n android:name=\"PACKAGE_NAME.permission.RECEIVE_ADM_MESSAGE\"\n android:protectionLevel=\"signature\"/>\n <uses-permission\n android:name=\"PACKAGE_NAME.permission.RECEIVE_ADM_MESSAGE\"/>\n \n <!-- This app has permission to register and receive data message. -->\n <uses-permission\n android:name=\"com.amazon.device.messaging.permission.RECEIVE\"/>\n \n <!-- ADM requires Android SDK version 2.2 (API level 8 ) or above. -->\n <!-- The targetSdkVersion is optional, but it's always a good practice\n to target higher versions. -->\n <uses-sdk android:minSdkVersion=\"8\" android:targetSdkVersion=\"16\"/>\n \n </manifest>\n \n ]]>\n </manifestAdditions>\n <colorDepth>16bit</colorDepth>\n</android>\n", "language": "xml", "name": "Amazon" } ] } [/block] [block:callout] { "type": "warning", "title": "iOS Important Info", "body": "Please note that for **development builds** ( ones signed with iOS Development Certificates) the value for `aps-environment` should be **development** as in the example above. For **Ad-Hoc** or **AppStore** builds (ones signed with iOS Production Certificate) please use **production** value." } [/block] [block:callout] { "type": "danger", "title": "Android Important Info", "body": "IMPORTANT! Project Number is an integer but prefix it with \"\\ \" as in the example above or the letter “A”. Ex: \"A1234567890\".\n\nNote that for debug builds Adobe Air automatically postfixes your package name with “.debug”. We recommend to use “Release” builds to prevent a lot of headache." } [/block] [block:callout] { "type": "info", "title": "Amazon API Key", "body": "Get the API KEY from Amazon according to the [Amazon guide](https://developer.amazon.com/sdk/adm/credentials.html).\nFor a pre-release or “debug” version of your app, you must create an API Key and store it as the only data in a file named api_key.txt . **The api_key.txt file must be located inside the assets folder for your project.**\nNote: ADM cannot recognize your API Key if it contains any spaces or line breaks.\nFor a release or “production” version of your app, you may not need to create an API Key. Create an additional API key nly if you sign the release version of your app using your own certificate, must you create an additional API Key for the release version of your app. You don't need an extra API key if you let Amazon sign the app on your behalf." } [/block] 4. Make sure you select “Package” checkbox on the “Native Extensions” pane in the settings. Also select the path to the latest iOS SDK as per screenshot below when exporting for iOS: [block:image] { "images": [ { "image": [ "https://files.readme.io/BG2U17dQc6mbK4cuspd3_asdasdad.jpg", "asdasdad.jpg", "826", "402", "#89a4bd", "" ] } ] } [/block] That’s it!