I have a background service that gets data from somewhere and likes to draw to a canvas.
The service creates a Canvas object and use the draw primitives on it from the service.
Does Android allow that?
Thanks
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.
Background services don’t interact with UI. If you’re looking to show something to the user, you could instead have the service fetch the data, and notify an activity that draws. That said, I don’t see why a service can’t interact with a Canvas object as long as you’re not displaying it. If you’re just drawing on it and then writing to disk for example, I believe it should be technically possible.