Disable Quick Settings Tile in Android

Disable quick settings tile in Android

It seems is impossible to do at all.

That is the answer.

Disable Bluetooth Tile in Quick Settings Panel

Searched a bit on cs.android.com and this seems to be the relevant class.

frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java

From there you can handle click ( or not handle it actually), or show a "disabled" icon etc.

If you want to "remove" it, then frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java seems to be the class that adds them. It reads from Settings.Secure.QS_TILES

Close Quick Settings Panel after click the Quick Setting tile in android

You can use startActivityAndCollapse instead of startActivity in your onClick function in TileService which will collapse the QS panel.

Dynamic Quick Settings tile in nougat

Solved this issue by enabling and disabling the service via package manager.

if (state) {
pm.setComponentEnabledSetting(componentName,
PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
PackageManager.DONT_KILL_APP);
} else
pm.setComponentEnabledSetting(componentName,
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);

Where state is a boolean representing the switch for the service

Quick Settings Toggle in Android N

Just remove these lines from your QuickSettingTileService class

@Override
public IBinder onBind(Intent intent)
{
return null;
}

@Override
public int onStartCommand(Intent intent, int flags, int startID)
{
//some setup code is here
return START_STICKY;
}

There is no need to override onBind() or onStartCommand() on a TileService.

Also, you don't need to explicitly start this service. The permission and intent-filter in the manifest will make sure Android OS will start your service when your tile is added to the Notification bar.

Android Quick Settings Tile Drop Down Menu

It seems from here that unfortunately third party apps cannot use this feature.

Quote:

Note: You’ll notice some of the system tiles have an additional UI that replaces the whole quick settings pane with a custom UI. Unfortunately, this isn’t available to third party tiles.

Tile Settings OnClickListener

There is no onclicklistener for settings but you can use broadcast listener to listen to event and do as you desire. hope this helps



Related Topics



Leave a reply



Submit