I have a Service singleton class with static methods that I call from the same process. I call startService when my Application starts. I also call bindService, but now I am wondering if that is really necessary.
Share
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.
It depends on whether you need to call instance methods on that service or not. StartService gets the service up and running and working on whatever Intent you sent it but you still can’t interact with it because you don’t have a reference to the service object. Calling bindService is what gives that reference so that you can call instance methods on it. If you don’t need that, you don’t need bindService.