android-components / mozilla.components.support.ktx.android.content

Package mozilla.components.support.ktx.android.content

Properties

Name Summary
appName val <ERROR CLASS>.appName: String
Returns the name (label) of the application or the package name as a fallback.
appVersionName val <ERROR CLASS>.appVersionName: String?
The (visible) version name of the application, as specified by the tag’s versionName attribute. E.g. “2.0”.
isScreenReaderEnabled val <ERROR CLASS>.isScreenReaderEnabled: Boolean
Check if TalkBack service is enabled.

Functions

Name Summary
hasCamera fun <ERROR CLASS>.hasCamera(): Boolean
Checks whether or not the device has a camera.
isMainProcess fun <ERROR CLASS>.isMainProcess(): Boolean
Returns true if we are running in the main process false otherwise.
isOSOnLowMemory fun <ERROR CLASS>.isOSOnLowMemory(): Boolean
Returns whether or not the operating system is under low memory conditions.
isPermissionGranted fun <ERROR CLASS>.isPermissionGranted(permission: Iterable<String>): Boolean
Returns if a list of permission have been granted, if all the permission have been granted returns true otherwise false.fun <ERROR CLASS>.isPermissionGranted(vararg permission: String): Boolean
runOnlyInMainProcess fun <ERROR CLASS>.runOnlyInMainProcess(block: () -> Unit): Unit
Takes a function runs it only it if we are running in the main process, otherwise the function will not be executed.
share fun <ERROR CLASS>.share(text: String, subject: String = getString(R.string.mozac_support_ktx_share_dialog_title)): Boolean
Shares content via ACTION_SEND intent.