Class VpnHoodAndroidApp
Provides the app on Android, started in the app's own process only.
public class VpnHoodAndroidApp : Singleton<VpnHoodAndroidApp>
- Inheritance
-
VpnHoodAndroidApp
- Inherited Members
Remarks
Android starts the head's application in every process of the package, the VPN service's and the Quick Settings tile's too; only the app's own process builds anything, so the init params come as a factory, called only there.
Methods
Dispose(bool)
Releases the instance; with disposing and when it is the registered one, unregisters it.
protected override void Dispose(bool disposing)
Parameters
Remarks
It disposes the app.
Init(Func<AppInitParams>)
Starts the app, once, in the app's own process; in another process of the package, or a second time, it starts nothing.
public static VpnHoodAndroidApp Init(Func<AppInitParams> initParamsFactory)
Parameters
initParamsFactoryFunc<AppInitParams>Makes the head's init params, called only where the app starts.
Returns
- VpnHoodAndroidApp
The app's Android host.
Remarks
It throws what the app's start throws, as below.
Exceptions
- Exception
An ad provider names countries both to include and to exclude.
- OverflowException
A duration in a built-in access key is out of range.
- InvalidDataException
A built-in access key decodes to JSON
null.- JsonException
A built-in access key holds no valid access key.
- NotSupportedException
A built-in access key's version is not one the app reads.
- FormatException
A built-in access key is no valid Base64, or an endpoint or a duration in it is not valid.
- InvalidOperationException
The process's or the package's identity cannot be read; or, in the app's own process, Android names no cache folder, the init params name no storage folder, the platform has no local app data folder, Android names no folder kept out of backups, or a debug build's storage check fails.