I think not may be I’m wrong is there a different way? the thing is I have a function to access from a activity and I can’t define the same function within the service
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.
Your question is a bit ambiguous, but I’ll try to answer it anyways:
onStop()-method.Don’t abuse the
Activity-classes for function-collections! There should only be methods inside it which work directly with the Activity itself.For function collections or if you need to access a class with one state from multiple Activities, consider one of these:
Application