TileService


public class TileService
extends Service

java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ android.service.quicksettings.TileService


A TileService provides the user a tile that can be added to Quick Settings. Quick Settings is a space provided that allows the user to change settings and take quick actions without leaving the context of their current app.

The lifecycle of a TileService is different from some other services in that it may be unbound during parts of its lifecycle. Any of the following lifecycle events can happen independently in a separate binding/creation of the service.

TileService will resolve against services that match the .ACTION_QS_TILE action and require the permission android.permission.BIND_QUICK_SETTINGS_TILE. The label and icon for the service will be used as the default label and icon for the tile. Here is an example TileService declaration.

 <service
     android:name=".MyQSTileService"
     android:label="@string/my_default_tile_label"
     android:icon="@drawable/my_default_icon_label"
     android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
     <intent-filter>
         <action android:name="android.service.quicksettings.action.QS_TILE" />
     </intent-filter>
 </service>
 

Summary

Constants

String ACTION_QS_TILE

Action that identifies a Service as being a TileService.

String ACTION_QS_TILE_PREFERENCES

An activity that provides a user interface for adjusting TileService preferences.

String CATEGORY_ACCESSIBILITY

Tile category for accessibility related tiles.

String CATEGORY_CONNECTIVITY

Tile category for connectivity related tiles.

String CATEGORY_DISPLAY

Tile category for display related tiles.

String CATEGORY_PRIVACY

Tile category for privacy related tiles.

String CATEGORY_UTILITIES

Tile category for utility tiles.

String META_DATA_ACTIVE_TILE

Meta-data for tile definition to set a tile into active mode.

String META_DATA_TILE_CATEGORY

Meta-data to set a category for a tile.

String META_DATA_TOGGLEABLE_TILE

Meta-data for a tile to mark is toggleable.

Inherited constants