ControlsProviderService


public abstract class ControlsProviderService
extends Service

java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ android.service.controls.ControlsProviderService


Service implementation allowing applications to contribute controls to the System UI.

Summary

Constants

int CONTROLS_SURFACE_ACTIVITY_PANEL

Controls are being shown on the device controls activity panel.

int CONTROLS_SURFACE_DREAM

Controls are being shown as a dream, while the device is idle.

String EXTRA_CONTROLS_SURFACE

Integer extra whose value specifies the surface which controls are being displayed on.

String EXTRA_LOCKSCREEN_ALLOW_TRIVIAL_CONTROLS

Boolean extra containing the value of the setting allowing actions on a locked device.

String META_DATA_PANEL_ACTIVITY

Manifest metadata to show a custom embedded activity as part of device controls.

String SERVICE_CONTROLS

String TAG

Inherited constants

Public constructors

ControlsProviderService()

Public methods

abstract Publisher<Control> createPublisherFor(List<String> controlIds)

Return a valid Publisher for the given controlIds.

abstract Publisher<Control> createPublisherForAllAvailable()

Publisher for all available controls Retrieve all available controls.

Publisher<Control> createPublisherForSuggested()

(Optional) Publisher for suggested controls The service may be asked to provide a small number of recommended controls, in order to suggest some controls to the user for favoriting.

final IBinder onBind(Intent intent)

Return the communication channel to the service.

final boolean onUnbind(Intent intent)

Called when all clients have disconnected from a particular interface published by the service.

abstract void performControlAction(String controlId, ControlAction action, Consumer<Integer> consumer)

The user has interacted with a Control.

static void requestAddControl(Context context, ComponentName componentName, Control control)

Request SystemUI to prompt the user to add a control to favorites.

Inherited methods