Table of Contents

Class QuickLaunchTileService

Namespace
VpnHood.AppLib.App.Android
Assembly
VpnHood.AppLib.App.Android.dll

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

bool

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

intent Intent

To 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.

Android reference for

    <pre><code class="lang-csharp">android.service.quicksettings.TileService.onBind</code></pre>

    .</a>
</format>

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

OnClick()

Called when the user clicks on this tile.

public override void OnClick()

Remarks

Called when the user clicks on this tile.

Java documentation for

    <pre><code class="lang-csharp">android.service.quicksettings.TileService.onClick()</code></pre>

    .</a>
</format>

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

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.

Android reference for

    <pre><code class="lang-csharp">android.app.Service.onCreate</code></pre>

    .</a>
</format>

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

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.

Android reference for

    <pre><code class="lang-csharp">android.app.Service.onDestroy</code></pre>

    .</a>
</format>

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

OnStartListening()

Called when this tile moves into a listening state.

public override void OnStartListening()

Remarks

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.

Java documentation for

    <pre><code class="lang-csharp">android.service.quicksettings.TileService.onStopListening()</code></pre>

    .</a>
</format>

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

OnTileAdded()

Called when the user adds this tile to Quick Settings.

public override void OnTileAdded()

Remarks

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.

Java documentation for

    <pre><code class="lang-csharp">android.service.quicksettings.TileService.onTileRemoved()</code></pre>

    .</a>
</format>

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.