Broadcast receiver lifecycle

A broadcast receiver has single callback method void onReceive(Context curContext, Intent broadcastMsg) When a broadcast message arrives for the receiver, Android calls its onReceive() method and passes it the Intent object containing the message. The broadcast receiver is considered to be active only while it is executing this method. When onReceive() returns, it is inactive. A process with an active broadcast receiver is protected from being killed. But a process with only inactive components...

Remote procedure calls

Heirship Chart Texas

Android has a lightweight mechanism for remote procedure calls RPCs where a method is called locally, but executed remotely in another process , with any result returned back to the caller. This entails decomposing the method call and all its attendant data to a level the operating system can understand, transmitting it from the local process and address space to the remote process and address space, and reassembling and reenacting the call there. Return values have to be transmitted in the...

Google Maps External Library

To make it easier for you to add powerful mapping capabilities to your application, Google provides a Maps external library that includes the com.google.android.maps package. The classes of the com.google.android.maps package offer built-in downloading, rendering, and caching of Maps tiles, as well as a variety of display options and controls. The key class in the Maps package is com.google.android.maps.MapView, a subclass of ViewGroup. A MapView displays a map with data obtained from the...

Providing Mock Location Data

When testing your application on the Android emulator, there are a couple different ways to send it some mock location data you can use the DDMS tool or the geo command option in the emulator console. With the DDMS tool, you can simulate location data a few different ways Manually send individual longitude latitude coordinates to the device. Use a GPX file describing a route for playback to the device. Use a KML file describing individual placemarks for sequenced playback to the device. For...

Setting hardware emulation options

When are creating a new AVD that uses a standard Android system image (Type platform), the android tool lets you set hardware emulation options for virtual device. The table below lists the options available and the default values, as well as the names of properties that store the emulated hardware options in the AVD's configuration file (the config.ini file in the AVD's local directory). The amount of physical RAM on the device, in megabytes. Default value is 96. Whether there is a touch...

Signing in Debug Mode

The Android build tools provide a debug signing mode that makes it easier for you to develop and debug your application, while still meeting the Android system requirement for signing your .apk when it is installed in the emulator or a device. When you use debug mode, the SDK tools invoke Keytool to create a debug keystore and key. The SDK tools create the debug keystore key with predetermined names passwords Keystore name - debug.keystore Keystore password - android Key alias - androiddebugkey...