Free Android app covering all aspects of addiction, including prevention and treatment

Using your application resources You should keep your resources, like images, strings, values, etc. separate from your code. Some of the folders in the res directory
Bound Services. A way to interact with the Service Our tutorial app uses a Service to play a sound clip. We start a Service when the app starts. The Service will run as long as the app is alive. We need to bind to the Service to start and stop…
Bound Services: a primer Quick recap on Services Services are app components that you can use to do work in the background. Services run in your app’s process in the main thread. Don’t block the main thread. Use a separate thread to do any heavy work in your Service. You…
Out in the open: The foreground Service It’s unlikely that the system will kill a foreground Service. Typically we’d use foreground Services for work that the user is aware of, like playing music. When we use a foreground Service, we have to send a notification to: let the user know…
Doing it in the background. Services Tutorials. Part 1: A Simple Service Our tutorial app shows you how to use Services to: use a simple Service to update a user’s score on a server use a foreground Service to play music in the background There are two parts to the…