-1

I have an app which has a queue in the background to do something. I also have a service which shows and updates a notification in the notification-center about the progress of the queue (because it is not depending on a certain activity).

Notification be like: "there are 4 items left".

All works great except the app is destroyed (by the user and/or system).

I want to update the notification bevore the app or the service is closed (to something like "come back, you missed some items"). I know there is no "close"-event for an application and the "destroyed" event from the service is not called in this case.

I'm working with Xamarin.

What can I do to achive this? Any ideas? Thanks

Joehl
  • 3,671
  • 3
  • 25
  • 53

1 Answers1

1

You can initiate your background service using Alarm Manager even if it is killed. I have faced the same problem when I had to update the user's current location. I set an infinite alarm which starts android service if its not started in every five minutes. You can give it a try.

Shrey
  • 248
  • 3
  • 14
  • This is the last resort =) I just wanted to ask if there is another "clean" solution to do this.. Thank you – Joehl Feb 18 '15 at 12:33