HostInfo


class HostInfo


Container class for information about the host the app is connected to.

Apps can use this information to determine how they will respond to the host. For example, a host which is not recognized could receive a message screen while an authorized host could receive full access to the app's capabilities.

The package name and uid can used to query the system package manager for a signature or to determine if the host has a system signature.

The host API level can be used to adjust the models exchanged with the host to those valid for the specific host version the app is connected to.

Summary

Public constructors

HostInfo(packageName: String, uid: Int)

Constructs an instance of the HostInfo from the required package name, UID and API level.

Public functions

String

Returns the package name of the host.

Int

Returns the UID of the host.

String

Public constructors

HostInfo

Added in 1.0.0
HostInfo(packageName: String, uid: Int)

Constructs an instance of the HostInfo from the required package name, UID and API level.

Public functions

getPackageName

Added in 1.0.0
fun getPackageName(): String

Returns the package name of the host.

getUid

Added in 1.0.0
fun getUid(): Int

Returns the UID of the host.

toString

fun toString(): String