Push Notification enables developers to push messages to mobile devices using Push technology.
In order to implement this in a Flex Mobile AIR application, you will need to use Native Extension to do so. A freely available Native Extension for Push Notifications has been developed by Piotr Koscierzynski. The extension can be downloaded from here.
In case you are looking for a paid native extension with good support, easy to use examples and bonus native extensions, you can check this package by distriqt.
The blog post provides pretty good explanation on using the Native Extension in your projects. But many people have reported there of facing few issues while using the extension. Even I was not able to make it work initially. Going through the blog comments and some research at my end, I was able to get it working. Just in case you are not able to make it work, make sure you have followed the below mentioned points while using it:
- Make sure you compile the project on a Mac machine. This Native Extension will give you an error while publishing a build on a Windows machine.
- It works fine with AIR 3.2 and iOS 5.1
- Make sure the provisioning file you are using has been enabled for Push Notifications.
- Entitlements additions required in the app.xml:
[cc lang=”xml”]
get-task-allow
[/cc]
In order to make the push notifications work, you will need to develop a server side script. A good tutorial to implement a server side script is available here.
Sample project source can be downloaded from here.
Recommended readings for Flex/Flash/AIR Mobile Applications:
- High Performance Flash: Performance tuning for Flash, Flex, AIR and Mobile applications
- Foundation Flash Applications for Mobile Devices
- Mobile Development with Adobe Flash Professional CS5.5 and Flash Builder 4.5: Learn by Video
- Pro Android Flash (Professional Apress)
- Developing Android Applications with Adobe AIR (Adobe Developer Library)
hi
i am trying to implement push notification integration in my flex mobile application for iOS and android, but i can not succeed can you please help me to configure the files, i am using the above extension in my application.
i had changed the application id in xml file but got some problems in Entitlements…
i changed the application-identifier and keychain-access-groups in Entitlements to my provisioning profile’s identifier.
but than it will gives me error i.e
The executable was signed with invalid entitlements.
The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.
Samir, when do you get this error? Is it while publishing or while installation. In order to confirm the entitlements data, open your provisioning file in a text editor and look for the entitlements tag within it. They should be same as in your app.xml
Hi got the
error
The executable was signed with invalid entitlements.
The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.
(0xE8008016).
i given the same app-provisioning profile identifier, and this profile is enable for push notification in iOS provisioning portal.
can you figure out this issue.?
Thanks for your reply
-samir
hi
i check provisioning profile from the build its same as i define in app.xml file.
can you please provide me any example…
Thanks…
-samir
Sample project source has been added.
Got the application running on iOS 8, but I just receive 2 messages and it stops at “registering device to APNS” – the device token is not returned, any ideas?