Quick settings is undoubtedly one of the most popular feature in Android devices. It provides a convenient way to quickly change the device settings or key actions directly from the notification panel.

Like always, Google never disappoint developers. This time, Android N introduced the new Quick Settings Tile API and allow developers to add their own quick setting actions. Now Quick Settings Tile adds more room for additional custom actions and you can swipe left/right to access more settings.

Please note, Quick Settings tiles are reserved for controls or actions that are either urgently required or frequently used, and should not be used as shortcuts to launching an app.

Android Quick Settings Tiles can only have icons of a single colour. It can be tinted to either white or grey. You can handle click, double click action on the tiles but the long press is restricted only to few system apps.

Android Quick Settings API Example

In this tutorial we will see how to use the Quick Settings Tile API in Android N to register a custom tile action. The sample application will add a custom action to quick settings and when clicked it will launch an activity.

You need the following perquisites to run this code sample.

  • Android Studio version 2.0+
  • A test device or emulator configuration with Android version 6.0+

Adding a tile to quick settings involves two steps. First you need to declareQuick Settings Tile in AndroidManifest.xml file. Add the following code snippets inside <application> element.

        <action android:name="android.service.quicksettings.action.QS_TILE" />

Let us now extend the TileService class to respond the Tile events and handle click action to launch an activity when user clicking on the Quick Settings Tile. You can optionally override the following methods to perform different actions when the Tile state changes.

onTileAdded() Called when user adds the tile to the quick settings from the edit interface
onTileRemoved() Called when the tile is removed from the quick settings using the edit interface.
onStartListening() Called when the tile is brought into the listening state.
onStopListening() Called when the tile is brought out of the listening state.
onClick() Called when the tile is clicked.


public class MyAppTileService extends TileService {
    public void onDestroy() {

    public void onTileAdded() {

    public void onTileRemoved() {

    public void onStartListening() {

    public void onStopListening() {

    public void onClick() {
        //Start main activity
        startActivity(new Intent(this, MainActivity.class));


This article is about: Android N, Open Source,


A blogger, a bit of tech freak and a software developer. He is a thought leader in the fusion of design and mobile technologies. He is the author of Xamarin Mobile Application Development for Android Book (goo.gl/qUZ0XV3), DZone MVB and founder of stacktips.com.


Please note: We reserve the right to delete comments that contains snarky remarks, offensive or off-topic. To know more read our comments policy.