0

I have a broadcast receiver on my app. But I want to listen push notification on everytime I mean when phone restarted I want to start my receiver OR when a user clean all application I need to restart my broadcast receiver again. It is possible? How it can be possible?

CompEng
  • 7,161
  • 16
  • 68
  • 122
  • 1
    What do you mean of restart receiver? Static receivers always listens intents. – Pankaj Kumar Sep 11 '14 at 05:36
  • but when my phone restart it does not listen anymore. – CompEng Sep 11 '14 at 05:38
  • For push notifications You are using GCM jars or PlayServices for android? – Ashwin N Bhanushali Sep 11 '14 at 05:40
  • 1
    Add you code here. And what are you trying to do? – Pankaj Kumar Sep 11 '14 at 05:41
  • I use parse.com to push notification. It works fine. But when I restart my phone it does not listen anymore untill I open my app again – CompEng Sep 11 '14 at 05:43
  • 1
    So you can lunch service in your app when phone system boot. In the service you can make needed action (lunch broadcast or smth). this link can be helpfull http://stackoverflow.com/questions/14385231/android-broadcastreceiver-auto-run-service-after-reboot-of-device – MyWay Sep 11 '14 at 06:34
  • I think this is a dupe of http://stackoverflow.com/questions/13959410/android-register-a-permanent-broadcast-receiver – tarun713 Apr 13 '15 at 18:19

0 Answers0