What is best way for services error handling? For example, I have service which get some information from Internt, I want show to user some dialog with message when connectivity is bad. Or if I have some Util class for parse HTML that used by my service and exception occures in this Util class. How to show dialog? As I know DialogBuilder needs some Activity context, but Service context is wrong for this. Right? Thanks.
A:
Have you considered using a notification? You can set a brief message and icon on the task bar, and the user has the option of clicking it, where you can open up a dialog with more details or they can just clear it. You can also clear it within the service if connectivity gets better.
Mike
2010-09-13 01:34:09