After installing the APK, go to the system control center to add the tile switch.
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
equalizer = new Equalizer(0,0);
loudnessEnhancer = new LoudnessEnhancer(0);
public class TileS extends TileService {
@Override
public void onTileAdded() {
super.onTileAdded();
tile = getQsTile();
tile.setState(Tile.STATE_INACTIVE);
tile.updateTile();
}
@Override
public void onStartListening() {
super.onStartListening();
}
@Override
public void onStopListening() {
super.onStopListening();
stopDeviceMonitorTask();
}
@Override
public void onDestroy() {
super.onDestroy();
stopDeviceMonitorTask();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
return START_STICKY;
}
}