HERE Android SDK Developer's Guide

StreetLevelOffScreenCapture

The class StreetLevelOffScreenCapture is a member of com.here.android.mpa.streetlevel .

Class Summary

public final class StreetLevelOffScreenCapture

   implements com.here.android.mpa.common.OffScreenRenderer

extends java.lang.Object

StreetLevel derivation of the com.here.android.mpa.common.OffScreenRenderer renderer.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in StreetLevelOffScreenCapture
Constructors

StreetLevelOffScreenCapture (Context context)

Public constructor.

Method Summary

Table 2. Methods in StreetLevelOffScreenCapture
Methods

public void getScreenCapture (OnScreenCaptureListener listener)

Returns a bitmap of the Street Level Imagery.

public void pause ()

Pause the offscreen renderer

public StreetLevelOffScreenCapture setModel (StreetLevelModel model)

Set the StreetLevelModel for off-screen rendering

public StreetLevelOffScreenCapture setSize (int width, int height)

Set the size of the requested screen capture.

public void start ()

Start the offscreen renderer.

public void start (SurfaceHolder renderTarget, SurfaceUpdatedListener listener)

Start the offscreen renderer.

public void stop ()

Stop the offscreen renderer.

Class Details

StreetLevel derivation of the com.here.android.mpa.common.OffScreenRenderer renderer. This class as allows the user to capture screenshots of a StreetLevel without using an Android View .

Constructor Details

StreetLevelOffScreenCapture (Context context)

Public constructor.

Parameters:

  • context

Throws:

  • AccessControlException

    Access to this operation is denied. Contact your HERE representative for more information.

Method Details

public void getScreenCapture (OnScreenCaptureListener listener)

Returns a bitmap of the Street Level Imagery. Bitmap is of size set by setSize(int, int). Call this method only after the rendering thread is started via start(). This method is asynchronous and will invoke a callback once the operation is completed through the ScreenCaptureListener. Note that the rendering thread must be started before this operation.

Parameters:

  • listener

    A ScreenCaptureListener to listen for the callback when screen capture is complete.

See also:

setSize(int, int)

start()

public void pause ()

Pause the offscreen renderer

public StreetLevelOffScreenCapture setModel (StreetLevelModel model)

Set the StreetLevelModel for off-screen rendering

Parameters:

Returns:

This StreetLevelOffScreenCapture object

public StreetLevelOffScreenCapture setSize (int width, int height)

Set the size of the requested screen capture. This method must be called before start().

Parameters:

  • width

    Desired width of the returned bitmap

  • height

    Desired height of the returned bitmap

Returns:

This StreetLevelOffScreenCapture object

public void start ()

Start the offscreen renderer. A new PBuffer based surface will be allocated.

public void start (SurfaceHolder renderTarget, SurfaceUpdatedListener listener)

Start the offscreen renderer. The renderer will be attached to the supplied Surface argument.

Parameters:

  • renderTarget

    Surface to attach to.

  • listener

    Callback when the surface has been updated

public void stop ()

Stop the offscreen renderer. All resource allocated will be released.

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.