English | Site Directory

Android - An Open Handset Alliance Project

com.google.android.maps
public abstract class

com.google.android.maps.MapActivity

java.lang.Object
android.content.Context
android.app.ApplicationContext ViewInflate.Factory
android.app.Activity KeyEvent.Callback Window.Callback
com.google.android.maps.MapActivity

Base class with code to manage the boring necessities of any activity that displays a MapView:

  • Activity lifecycle management
  • Setup and teardown of services behind a MapView
A subclass should create its own MapView in onCreate(Bundle).

Summary

Constants inherited from class android.app.Activity
Constants inherited from class android.content.Context

Fields

protected    final  Handler  mHandler  A Handler to receive events that alter the view tree. 

Public Constructors

          MapActivity()

Protected Methods

        void  doHandleMessage(Message message)
Subclasses which wish to post messages to mHandler should override this method to provide handling for those messages.
        DataRequestDispatcher  getDispatcher()
WARNING: This method will be restricted to the Maps Application in the future.
        boolean  isLocationAvailable()
        void  onCreate(Bundle icicle)
Here we initialize static factories, create the map object and the traffic service, and begin our threads.
        void  onDestroy()
Stops all our threads.
        void  onPause()
Pauses the traffic service, because we don't want it running forever in the background.
        void  onResume()
Here we also tell the map to "predraw", which front-loads fetching and decoding, so that the first draw will appear more "atomic".
        void  onStop()
"Closes" the map, committing tile cache to the filesystem.
Methods inherited from class android.app.Activity
Methods inherited from class android.app.ApplicationContext