Local notifications ANE
This extension works fine on IOS but on Android with some bugs.
On Android if we set few notifications with fire dates of several minutes we receive them only when the app is running.
If we close the app all notifications that had to be fired are ignored or cleared.
We tried same thing to do with the example project included with the notification.
Any one encountered this issue and how to fix that?
-
Andi,
The xml listed here is still the correct version. Calling register allows you to receive startup notifications, which will be dispatched immediately if available.
Regards,
Michael -
Andi Triendl commented
And: Do I have to call: Notifications.service.register();?
-
Andi Triendl commented
I cannot seem to get it to work either. Could you point out which XML setup to use for the latest version of the ANE?
-
Anonymous commented
thanks it works right now
-
Hi,
Your additions are incorrect, you are missing the application node. Check the example application for the details:
<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto" >
<uses-permission android:name="android.permission.INTERNET"/>
<application>
<receiver android:name="com.distriqt.extension.notifications.NotificationsReceiver">
<intent-filter>
<action android:name="air.com.distriqt.test.NOTIFICATION" />
<action android:name="air.com.distriqt.test.DELAYED_NOTIFICATION" />
</intent-filter>
</receiver>
</application>
</manifest>
]]></manifestAdditions>
</android>Cheers
-
Anonymous commented
Hi,
I am using Flash CS6
I tried your suggestionI wrote the following tags to my xml file "Tester_1-app.xml"
<android>
<manifestAdditions>
<![CDATA[<manifest>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/><receiver android:name="com.distriqt.extension.notifications.NotificationsReceiver">
<intent-filter>
<action android:name="air.Tester1.NOTIFICATION" />
<action android:name="air.Tester1.DELAYED_NOTIFICATION" />
</intent-filter>
</receiver></manifest>]]>
</manifestAdditions>
</android>But it still doesnt works
any Ideas? -
lw commented
Hi,
If somebody is still having troubles with this,
I finally found the answer to my problem :-)
As "distriqt support" already suggested: check if your manifest-additions are correctly specified. (yeah okay, but what do you mean by correctly specified)Here it is:
<receiver android:name="com.distriqt.extension.notifications.NotificationsReceiver">
<intent-filter>
<action android:name="air.YOUR_APP_ID.NOTIFICATION" />
<action android:name="air.YOUR_APP_ID.DELAYED_NOTIFICATION" />
</intent-filter>
</receiver>found it here:
hth, regards
Lucas -
Hi,
That counts as closing the app normally and notifications will continue.
For those who aren't receiving them, check you have correctly specified the manifest additions inside the application tag. This is the most common cause of failed notifications.
Regards,
Michael -
Colin Holgate commented
One comment/question about task killing... It's true that few users will run a task killer app to quit running apps, but, in Android 3 and later it's normal to see a popup list of the running apps, and to flick ones you're no longer interested in off to the side.
Does that count as a task killer quit, or an OS closing the app the normal way?
-
Val commented
Hi.
Some updates on the issues with local notifications on android platform.
As i wrote below on android notifications are fired properly only when the app. is running. This issue still remains.
We tried them on Kindle Fire and we where surprised when saw that they work.Hope those details will help you.
We are waiting for and update for this ANE.
Thanks. -
flyz commented
i had the same problem with val, i used
NativeApplication.nativeApplication.exit(); to exit my apps but still, my notification won't fire after i exit my application.I had tried to includes stuff like:
Notifications.service.register()or
<receiver android:name="com.distriqt.extension.notifications.NotificationsReceiver">
<intent-filter>
<action android:name="air.testapp.NOTIFICATION"/>
<action android:name="air.testapp.DELAYED_NOTIFICATION"/>
</intent-filter>
</receiver>but still not working, its getting me frustrated whole day :( please help
-
Val commented
Hi. Thank's for feedbacks.
Anyway even doing a normal exit from the app. notifications that should be fired later are not fired at all.
We have no idea waht's happening there but notification on Android are fired only when app. is running. This is the issue that we are encountering on Android only. On IOS it works fine. -
Hi,
This is per design on Android. Most users do not use a task killer. Most will either use the normal exit process. Using an app killer is actually a discouraged process on Android these days.
Regards,
Michael -
Val commented
" Killing the application will remove all receivers, which will stop the notifications from firing. This is by design on Android "
How come? Users usually are killing the app through task manager, it's a common practice. Very few people are doing normal app. exit.
-
Val commented
Hi. When we kill the app all notifications are removed, it's true.
When we just do " NativeApplication.nativeApplication.exit(); " all received notifications remains in the notification tree but we are still not receiving any notification after normal appilication exit.
On android notifications are fired only when app is running.
-
Hi,
How are you closing the application? Killing the application will remove all receivers, which will stop the notifications from firing. This is by design on Android. If you do a normal application exit, or let the OS clear it as it requires you should still receive your notifications.
Cheers,
Michael