HERE Android SDK Developer's Guide

MapActivity

The class MapActivity is a member of com.here.android.mpa.common .

Class Summary

public class MapActivity

extends java.lang.Object

An activity class for managing the resource state of the MapEngine.

Deprecated: As of SDK 3.3, replaced by MapFragment.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in MapActivity
Constructors

MapActivity ()

Method Summary

Table 2. Methods in MapActivity
Methods

protected void onCreate (Bundle savedInstanceState)

Called when an instance of the given class is created (map activity begins).

protected void onInitialized (Error error)

Called when MapEngine initialization completes.

protected void onPause ()

Called when map activity pauses (is suspended).

protected void onResume ()

Called when the given instance of map activity resumes.

Class Details

Deprecated: As of SDK 3.3, replaced by MapFragment.

An activity class for managing the resource state of the MapEngine. When onCreate(Bundle) is called, it automatically initializes the MapEngine .

Only activities that consume or use an API needs to inherit from MapActivity .

This class overrides the methods android.app.android.app.Activity#onCreate(Bundle), android.app.android.app.Activity#onResume(), and android.app.android.app.Activity#onPause() defined in android.app.android.app.Activity.

This will not work as expected if your targetSdkVersion is set to 23 and above running on device with Marshmallow and above. MapActivity initializes MapEngine before asking users for permissions resulting in a blank screen. Use MapFragment instead.

Constructor Details

MapActivity ()

Method Details

protected void onCreate (Bundle savedInstanceState)

Called when an instance of the given class is created (map activity begins). The method issues an initialization request to the MapEngine. When MapEngine initialization has completed, onInitialized(Error) is called.

Parameters:

  • savedInstanceState

    An object representing the previous saved state of MapActivity; used if a new instance of this class is to be recreated from a previous session.

See also:

onInitialized(Error)

protected void onInitialized (Error error)

Called when MapEngine initialization completes. User of MapActivity class can override this to detect when or if MapEngine is ready for use.

Parameters:

protected void onPause ()

Called when map activity pauses (is suspended).

protected void onResume ()

Called when the given instance of map activity resumes.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.