0

My normal Service and GCMBaseIntentService in not working on device version >= lollipop..when i remove my app from phone's task manager, these service also stops working and i didn't get any push notifications. So how can i auto restart service or prevent my app for being forced closed . Please help me out from this.

Harsh Shah
  • 41
  • 6

2 Answers2

0

What is the device you are testing it on? Some (China) phones have additional security feature coming with their OS and it's called "auto start". It prevents the app from being started when it was killed for example by "swiping out" from task manager. Go to Settings > App manager > select your application and check if there is an option like that. Hope I helped you

Raphau
  • 116
  • 5
  • I am using redmi note 3 prime model, and version is 4.4.4 and i have gone through Settings > App manager > my app, but there no such option . how can we manage it programmtically.? – Harsh Shah Nov 22 '16 at 13:08
  • You said it's not working on lollipop and higher. So 4.4.4 is not lollipop. It looks like your issue is not the same as I thought. Sorry – Raphau Nov 22 '16 at 13:24
  • By mistake, i wrote lollipop, when i checked my testing device, that is kitkat.So please see if you can help. – Harsh Shah Nov 22 '16 at 13:29
  • Looks like it is a common issue on this device http://help.moengage.com/hc/en-us/articles/213367903-FAQ-Why-users-are-not-receiving-push-notifications-sent-by-you- – Raphau Nov 22 '16 at 13:35
0

If you want to run your service indefinitely you should check this answer. You should be able to receive your notification without this. Check if your broadcast receiver is called when notification is received.

Community
  • 1
  • 1