currently, i’m starting a background service using Intent in my app, but is there anyway of determining when the service has completed?
..possibly by using some kind of listener, or sending a message from the service, to the activity??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First, activities and services can communicate: the easiest is to use a custom broadcast.
Second, if your service is short lived and is outlived by activity invoking it, then you might instead consider using AsyncTask to simply run your task in the background thread.