Charlie Calvert on Elvenware

Writing Code and Prose on Computers

Elvenware

Android Applications

Every Android application is run in a sandbox. Each application is a different user and has a ID, which it will never know. It is possible to link two applications by allowing them to share an ID. Each ID has its own VM and its own Linux process. It is completely isolated from the rest of the OS unless it is given specific privileges.

An android application has components, each of which is declared in the manifest. There are four different types of components:

android.app.Application

This class gets called before the main Activity. You can use it to keep track of your current state, usually for debugging. For instance, you can override  the onCreate and onTerminate methods. Specify the name of this class in the Manifest:

<application android:name=".MyApplication" ...etc