I have the following situation:
I have a Service that checks periodically for new data over the internet,
- when new data are available they are downloaded and saved on sqlite.
- when the save to db is complete the service broadcasts an intent so that the activity knows to pull the new data from the db.
The user might want to request an immediate update...
...in that case I use a Messenger to request the Service to look for new data
Here is the problem:
the user is notified that a request is ongoing, but it might take a while, can be unsuccessful, could never return...
currently I get a message (using a Messenger) back from the Service to the Activity informing of the result of the request, or, if I get no message, in x seconds I inform the user that the request was unsuccessful.
- Please can you suggest a different approach?
- I don't like to wait for a message and if after x seconds none is received inform the user, is there a better way?