entertainment

I Stimuli, your entertainment hub for movies, music and books.

Search The Movie Database and The Open Movie Database for movies and TV shows.

Watch movies on Amazon and Youtube.

Search Spotify for music. Play music on Spotify.

Buy books, music and movies on Amazon.

The Activity Lifecycle

Round and round we go:The Activity Lifecycle Each app runs in its own process and contains one or more activities. The Android run time manages these processes and decides which app to kill if it needs resources. An app’s priority helps determine if the run time will kill it and…
Let someone else manage your downloads! The DownloadManager The download manager was introduced in Android 2.3 (API level 9). It’s a System Service that optimises the handling of long-running downloads in the background. The download manager handles HTTP connections, monitors connectivity changes, reboots, and ensures each download completes successfully Its…
AsyncTasks do it in the background The golden thread All Android components (like activities and services) start on the main thread. This is the thread that the user interacts with. You need to keep this thread clear so that the app does not hang. It’s a good idea to put…
  Doing it on the quiet: how to use an IntentService You should do time consuming work, like downloading files, on a separate thread. This will free up the main thread so your user can carry on using the app. IntentServices are the preferred way for doing long running background…

Start an activity for a result

Start me up: Starting an activity to get a result Sometimes, you may need to get data from another activity. That activity could be in your app or in another app. You could use startActivityForResult() to get that data for you.