Skip to main content
July 24, 2012
Question

push notification on android problem

  • July 24, 2012
  • 3 replies
  • 3011 views

I am using the ANE from distriqt.com for push notifications which then send a local notification.  This is working great except after the app has been in the background for awhile.  It stops receiving the notifications.

The documentation at the android developer site states:

On the device, the system broadcasts the message to the specified Android application via Intent broadcast with proper permissions, so that only the targeted Android application gets the message. This wakes the Android application up. The Android application does not need to be running beforehand to receive the message.

Do I have a setting or option wrong or do I need a different ANE.  It seems that the device is disabiling the app after a period of time in the background.

I would hate to think a user has to open the app at regular intervals to be able to receive the notifications.

This topic has been closed for replies.

3 replies

March 6, 2013

I had same problem.

and i found some info on distriqt documents.

Automatic Notifications

Under Android there is no "default" way of displaying the notifications. We have implemented a simple message that will get displayed in the notification area when you supply certain variables in the message content.

In order to display a notification automatically when your notification arrives you must specify the some specific variables in the GCM data packet. These are as follows:

  • tickerText: The text displayed in the ticker bar along the top of the device
  • contentTitle: The title of the notification in the notification centre
  • contentText: The text displayed in the notification centre below the title
  • sound: If set to default plays the default sound on notification arrival
  • vibrate: If set to true vibrtes the device on notification arrival

For example:

      "data" : { "tickerText" : "some ticker text", "contentTitle" : "some content title", "contentText" : "some content description text", "sound" : "default", "vibrate" : "false", "otherCustomData" : "some value" }, "registration_ids" : { ... } 

Note: to have the vibration work you need to add the vibration permission to your application manifest additions:

      <uses-permission android:name="android.permission.VIBRATE"/>

this may help.

I solved problem with changing variable names according to this document.

rjoshicool
Inspiring
July 28, 2012

Make sure you are using the latest ANE release from them which works on Google Cloud Messaging. C2DM has been discarded by Google. You will also have to setup a new Google App with GCM active. The updated docs exaplin the process.

Also you can contact their support team. They provide excellent and quick support.

July 28, 2012

The ANE is the latest.  The Google App was setup under the new GCM and not C2DM.  I did contact support and they gave me a link to documentation were I copy/pasted the info above. 

But like I said the app works great as long as it does not stay in the background long enough for the device to 'need more memory' and disable the app.  When this happens and I reopen the app it does appear to start over from the beginning like it was closed.   The only thing I can find to avoid this is running the app as a service but I don't think its possible.  (correct me if im wrong....please)

grosssmutttr
Known Participant
February 21, 2013

We also have the same problem.

The notifications work great but if you set the delay to 10 seconds and exit the process before the 10 seconds, there will never be a notification.

This is the same issue as described above.

Is there a solution.

We tested the app "Pou" and there we saw that it should be possible...

July 25, 2012

Still unable to find anything out about this problem.  If anyone has an app using push notifications on android that also sees the problem of not receiving the notifications if the app is in the background after some time (I think its 'low resource mode') please post and let me know so I may conclude this is a bug (because the documentation states otherwise).