Class QuickLaunchTileService
Provides the Quick Settings tile that connects and disconnects the VPN, in a lightweight process of its own but in a debug build.
[Service(Name = "crc64b220724eeef25bf1.QuickLaunchTileService", Process = ":vpnhood_tile", Permission = "android.permission.BIND_QUICK_SETTINGS_TILE", Icon = "@drawable/notification", Enabled = true, Exported = true)]
[MetaData("android.service.quicksettings.TOGGLEABLE_TILE", Value = "true")]
[IntentFilter(new string[] { "android.service.quicksettings.action.QS_TILE" })]
public class QuickLaunchTileService : TileService, IComponentCallbacks2, IComponentCallbacks, IJavaObject, IJavaPeerable, IDisposable
- Inheritance
-
QuickLaunchTileService
- Implements
- Inherited Members
Remarks
Its callbacks never touch the app: a tap disconnects the VPN service, starts it with its last configuration, or opens the app where there is none or the server asks for an ad. It is a passive tile, which reads the state again each time the panel opens.
Properties
IsTileProcess
Gets a value indicating whether this process is the tile's.
public static bool IsTileProcess { get; }
Property Value
Exceptions
- InvalidOperationException
The process's name cannot be read.
Methods
OnBind(Intent?)
Return the communication channel to the service.
public override IBinder? OnBind(Intent? intent)
Parameters
intentIntentTo be added.
Returns
- IBinder
Return an IBinder through which clients can call on to the service.
Remarks
Return the communication channel to the service. May return null if clients can not bind to the service. The returned IBinder is usually for a complex interface that has been described using aidl.
Note that unlike other application components, calls on to the IBinder interface returned here may not happen on the main thread of the process. More information about the main thread can be found in Processes and Threads.
Portions of this page are modifications based on work created and shared by the
OnClick()
Called when the user clicks on this tile.
public override void OnClick()
Remarks
Called when the user clicks on this tile.
Portions of this page are modifications based on work created and shared by the
OnCreate()
Called by the system when the service is first created.
public override void OnCreate()
Remarks
Called by the system when the service is first created. Do not call this method directly.
Portions of this page are modifications based on work created and shared by the
OnDestroy()
Called by the system to notify a Service that it is no longer used and is being removed.
public override void OnDestroy()
Remarks
Called by the system to notify a Service that it is no longer used and is being removed. The service should clean up any resources it holds (threads, registered receivers, etc) at this point. Upon return, there will be no more calls in to this Service object and it is effectively dead. Do not call this method directly.
Portions of this page are modifications based on work created and shared by the
OnStartListening()
Called when this tile moves into a listening state.
public override void OnStartListening()
Remarks
Called when this tile moves into a listening state.
When this tile is in a listening state it is expected to keep the
UI up to date. Any listeners or callbacks needed to keep this tile
up to date should be registered here and unregistered in #onStopListening().
OnStopListening()
Called when this tile moves out of the listening state.
public override void OnStopListening()
Remarks
Called when this tile moves out of the listening state.
Portions of this page are modifications based on work created and shared by the
OnTileAdded()
Called when the user adds this tile to Quick Settings.
public override void OnTileAdded()
Remarks
Called when the user adds this tile to Quick Settings.
Note that this is not guaranteed to be called between #onCreate()
and #onStartListening(), it will only be called when the tile is added
and not on subsequent binds.
OnTileRemoved()
Called when the user removes this tile from Quick Settings.
public override void OnTileRemoved()
Remarks
Called when the user removes this tile from Quick Settings.
Portions of this page are modifications based on work created and shared by the