Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

long press quick setting tile in android

I am new to android development. Trying to make a tile service, but I have trouble to overriding the default long press action.

For that, I have a class called QSTileService which extends TileService, and I want my tile to do different things depending on if you press or long press it. what ive found so far with buttons is to implement the OnLongClickListener interface and fill in what you want to do in the onLongClick method, but im not sure how to do this with quick setting tiles?

any help will be appreciated

like image 416
mk360 Avatar asked Aug 30 '26 03:08

mk360


1 Answers

as per Documentation:

Long clicking on your quick settings tile will, by default, go to your app’s info screen. You can override that behavior by adding an intent-filter to one of your activities like so:

<intent-filter>
    <action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES"/>
</intent-filter>
like image 80
Sandip Kothari Avatar answered Sep 03 '26 01:09

Sandip Kothari