android-components / mozilla.components.feature.customtabs / CustomTabsService

CustomTabsService

class CustomTabsService : CustomTabsService (source)

Service providing Custom Tabs related functionality.

Constructors

<init>

CustomTabsService()

Service providing Custom Tabs related functionality.

Functions

extraCommand

fun extraCommand(commandName: String?, args: Bundle?): Bundle?

mayLaunchUrl

fun mayLaunchUrl(sessionToken: CustomTabsSessionToken?, url: Uri?, extras: Bundle?, otherLikelyBundles: MutableList<Bundle>?): Boolean

newSession

fun newSession(sessionToken: CustomTabsSessionToken?): Boolean

postMessage

fun postMessage(sessionToken: CustomTabsSessionToken?, message: String?, extras: Bundle?): Int

requestPostMessageChannel

fun requestPostMessageChannel(sessionToken: CustomTabsSessionToken?, postMessageOrigin: Uri?): Boolean

updateVisuals

fun updateVisuals(sessionToken: CustomTabsSessionToken?, bundle: Bundle?): Boolean

validateRelationship

fun validateRelationship(sessionToken: CustomTabsSessionToken?, relation: Int, origin: Uri?, extras: Bundle?): Boolean

warmup

fun warmup(flags: Long): Boolean

Extension Properties

appVersionName

val Context.appVersionName: String?

The (visible) version name of the application, as specified by the tag's versionName attribute. E.g. "2.0".

Extension Functions

isOSOnLowMemory

fun Context.isOSOnLowMemory(): Boolean

Returns whether or not the operating system is under low memory conditions.

isPermissionGranted

fun Context.isPermissionGranted(vararg permission: String): Boolean

Returns if a list of permission have been granted, if all the permission have been granted returns true otherwise false.

systemService

fun <T> Context.systemService(name: String): T

Returns the handle to a system-level service by name.