• BlackBerry Dynamics
  • Runtime library for Android applications
  • 14.1.8215.34
LauncherDelegate Interface Reference

This interface contains methods which an application can use to control some aspects of the Launcher's operation. More...

Description

A class implementing this interface should be passed to Launcher.initForApplication() at startup time.

Public Member Functions

default boolean shouldShowButton (Activity activity)
 Override whether the launcher button should be shown on the specified Activity. More...
 
default boolean shouldShowCoachmark ()
 Override whether the coaching screen should be shown at first use. More...
 
default void onSettingsCommand ()
 Invoked when user taps on Settings icon. More...
 
default void onSettingsCommand (Activity originActivity)
 Invoked when user taps on Settings icon. More...
 

Member Function Documentation

◆ shouldShowButton()

default boolean shouldShowButton ( Activity  activity)

The default is that the button will be shown for all Activities.

Note that as the default implementation returns true, the only reason to provide a different implementation is to return false, i.e. to prevent the launcher button from being shown for an Activity.

◆ shouldShowCoachmark()

default boolean shouldShowCoachmark ( )

This screen is normally shown to explain the use of the Launcher, the first time it appears after the app is activated. This delegate method may be used to override this behavior.

Note that as the default implementation returns true, the only reason to provide a different implementation is to return false, i.e. to prevent the coaching screen from being shown.

Returns
Whether to show the coaching screen.

◆ onSettingsCommand() [1/2]

default void onSettingsCommand ( )

The application should show its settings screen. Note that this will always be called on the UI thread.

◆ onSettingsCommand() [2/2]

default void onSettingsCommand ( Activity  originActivity)

The application should show its settings screen. Note that this will always be called on the UI thread.

This flavor of onSettingsCommand is preferred, and will always be called if it is overridden.

Parameters
originActivitythe current Activity, provided so that a startActivity() call can be made without starting a new task.