1

In my application the activity recognition updates are directed to a IntentService through a pending Intent.I observed that sometimes the updates never get fired. But when phone is restarted the update start to fire.Have anybody come across this scenario?Is there some tuning that can be done ?

pablogeorge
  • 233
  • 1
  • 10
  • Have you use broadcast receiver?? – Shahil Modan Dec 04 '13 at 10:11
  • Sorry,what exactly did you mean?I am registering for activityRecogntion Updates via a pending Intent that will start Intent service.Then in the Intentservice the result is then broadcasted locally in my application.Did you mean to say that i should use a Broadcast receiver instead of IntentService in the Pending Intent?But what good does that do? – pablogeorge Dec 04 '13 at 10:18
  • 1
    I faced a similar issue myself. It seems to be a security issue in KitKat and possibly in older versions of android. have a look [here.](https://code.google.com/p/android/issues/detail?id=61850) – Forsyth Feb 20 '14 at 07:26
  • 1
    @Forsyth thanks - that link contained the solution for me on Nexus5/KitKat: using PendingIntent.FLAG_CANCEL_CURRENT rather than PendingIntent.FLAG_UPDATE_CURRENT got things working. – Stevie Apr 01 '14 at 19:05

0 Answers0