0

I am using commansware example for wakefulIntentService. I am stuck at a point where I am not able to create alert dialog for the user after my doWakefulWork() gets the updated response from the backend?

I am starting this service and closing as soon as i get the favorable response. I have my polling interval as 2 mins and max this service can poll for 3 attempts that is 6 min. I donot want to display notifications and toast message as I want to capture other event on button click of this alert dialog.

Any help on how to alert the user of this update?

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
Bir
  • 113
  • 3
  • 12

1 Answers1

2

You cannot raise a Dialog from a Service. This has nothing to do with WakefulIntentService.

You are welcome to start an activity from your service, perhaps an activity that uses a theme that makes it look like a dialog.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Yes I also thought about that later. Thanks for the reply Mark. Your tutorials and suggestions are a savior. – Bir Mar 11 '12 at 07:53