Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[potatotips #92]Integrating Quick Settings Tile...

[potatotips #92]Integrating Quick Settings Tiles
 into Your Android App

This is the slide, "Integrating Quick Settings Tiles
 into Your Android App" on potatotips 92.
#android #androidjp #potatotips

Avatar for Kenichi Kambara

Kenichi Kambara

July 23, 2025
Tweet

More Decks by Kenichi Kambara

Other Decks in Technology

Transcript

  1. About me •Mobile App Development •Speeches (e.g. 22 Int’l/100+ Domestic)

    •Writings (e.g. 10 Dev Books) •[Of fi cial] Evangelist at NTT TechnoCross •[Private] iplatform.org ਆݪ ݈Ұ (X:@korodroid) NEW
  2. 1. What Are Quick Settings Tiles? •Tiles shown in the

    Android quick settings panel •Added manually by the user •Requires Android 7.0 (API 24)+  https://developer.android.com/develop/ui/views/quicksettings-tiles
  3. 2. Why Quick Settings Tiles? •Offer fast access to key

    app features •Improve user experience with one-tap actions •Great for power tools, toggles, shortcuts 
  4. 4. How to Implement 1.Create a class extending TileService 2.Override

    onClick() and onStartListening() 3.Declare it in AndroidManifest.xml 4.(Optional) Open a Compose screen from the Tile 
  5. 5. TileService: Lifecycle Callbacks  Function Name When It's Called

    Notes onTileAdded() When the user adds the tile to Quick Settings for the fi rst time Called only once when the tile is fi rst added onStartListening() When the tile becomes visible and can be updated by the app Called each time the tile is shown (e.g., when Quick Settings panel is opened) onStopListening() When the tile is no longer visible and can't be updated Called when the tile is temporarily hidden (not removed) onClick() When the user taps the tile (active or inactive state) Should update the tile’s state via updateTile() after changes onTileRemoved() When the user removes the tile from Quick Settings Will not be called again until the tile is added again
  6. 5. Implementation: TileService  class MyTileService : TileService() { override

    fun onClick() { val intent = Intent(this, QuickSettingsScreenActivity::class.java).apply { fl ags = Intent.FLAG_ACTIVITY_NEW_TASK } startActivityAndCollapse(intent) } } •TileService: used to create a custom Quick Settings tile. •qsTile: a property of TileService used to customize the tile’s label, icon, and state.
  7. 7. Manifest Declaration  class MyTileService : TileService() { override

    fun onClick() { val intent = Intent(this, QuickSettingsScreenActivity::class.java).apply { fl ags = Intent.FLAG_ACTIVITY_NEW_TASK } startActivityAndCollapse(intent) } }
  8. Key Takeaways •Quick Settings Tiles are powerful entry points •Users

    must add tiles manually •Implementing with TileService is easy and clean 
  9. Please let me know if you have any requests such

    as technical speeches, technical writings and so on. Facebook:http://fb.com/kanbara.kenichi X:@korodroid LinkedIn:http://www.linkedin.com/in/korodroid Thank you so much