Package-level declarations

Properties

Link copied to clipboard

Context Extension to obtain the necessary information from ConnectivityManager

Link copied to clipboard
@get:RequiresPermission(value = "android.permission.ACCESS_NETWORK_STATE")
val Context.downstreamBandwidth: Int

Context Extension to check the downstream bandwidth that the user has with his Internet connection, this will return an Int with the amount of downstream bandwidth

Link copied to clipboard

Context Extension to get whether Talkback is activated or not

Link copied to clipboard

---- PRIVATE METHODS -----------------------------------------------------------------------

Link copied to clipboard

Context Extension to obtain Locale data from the device and thus be able to obtain for example the country

Functions

Link copied to clipboard

---- CLIPBOARD -----------------------------------------------------------------------------

Link copied to clipboard
@RequiresPermission(value = "android.permission.ACCESS_NETWORK_STATE")
fun Context.checkNetworkState(): Boolean

Context Extension to check the internet connection status, this will be checked in the usual way in addition to checking if internet is available in case Wi-Fi is being used or mobile data is being used, depending on the connection status a Boolean will be returned

Link copied to clipboard

---- PERMISSIONS ---------------------------------------------------------------------------

Link copied to clipboard

Context Extension to delete all cache data generated by the application during use

Link copied to clipboard
Link copied to clipboard
suspend fun Context.getImageToBitmap(url: String, force: Boolean = false, isHardware: Boolean = false): Bitmap?
Link copied to clipboard
fun <T> Context.getJsonDataFromAsset(fileName: String, typeClass: Class<T>): T?
Link copied to clipboard
@RequiresPermission(value = "android.permission.ACCESS_NETWORK_STATE")
fun Context.isConnectionAvailable(): Boolean

Context Extension to know if the Internet connection is available, this will return a Boolean

Link copied to clipboard
Link copied to clipboard
@RequiresPermission(value = "android.permission.ACCESS_NETWORK_STATE")
fun Context.isRoamingConnection(): Boolean

Context Extension to check if Internet roaming is enabled inside the user's device, this will return a Boolean

Link copied to clipboard
Link copied to clipboard
fun Context.longToast(message: String)

Context Extension to display a Toast with a long duration period in which a customized toast will be displayed

Link copied to clipboard
fun Context.openInCustomTab(url: String, @ColorRes colorBar: Int = R.color.browserActionsBgGrey)

Context Extension to open any url from Custom Chrome Tab or alternative WebView

Link copied to clipboard

Context Extension to open the Instagram profile, if you have the application installed it will open the profile in the application, in case you do not have it installed it will open a Chrome Tab with the function openInCustomTab

Link copied to clipboard
fun Context.openNavigationMaps(latitude: Double, longitude: Double): Intent

Context Extension to open Google Maps application to navigate with coordinates (latitude and longitude)

Link copied to clipboard
fun Context.openOtherApp(packageName: String, packageManager: PackageManager)

Context Extension to open any application that is installed inside the device

Link copied to clipboard

Context Extension to open the Phone application by passing the number you want to call as a parameter. This function does not make the call directly, it will only show the desired phone number in your Phone application by default

Link copied to clipboard
fun Context.openPlaystoreSubscriptions(productId: String, packageName: String)
Link copied to clipboard

Context Extension to open the Twitch profile, if you have the application installed it will open the profile in the application, in case you do not have it installed it will open a Chrome Tab with the function openInCustomTab

Link copied to clipboard
fun Context.openTwitter(username: String)

Context Extension to open the Twitter profile, if you have the application installed it will open the profile in the application, in case you do not have it installed it will open a Chrome Tab with the function openInCustomTab

Link copied to clipboard
fun Context.openYoutube(videoId: String = String.empty(), channelId: String = String.empty())

Context Extension to open the YouTube video or channel, if you have the application installed it will open the video or channel in the application, in case you do not have it installed it will open a Chrome Tab with the function openInCustomTab

Link copied to clipboard
fun Context.rateUs(packageName: String, @ColorRes customTabColor: Int)

Context Extension to open the Twitch profile, if you have the application installed it will open the profile in the application, in case you do not have it installed it will open a Chrome Tab with the function openInCustomTab

Link copied to clipboard
fun Context.saveBitmap(bitmap: Bitmap, filename: String = System.currentTimeMillis().toString()): Uri?

---- SAVE IMAGES ---------------------------------------------------------------------------

Link copied to clipboard
fun Context.share(title: String = String.empty(), message: String)

Context Extension to share a message via social networks or any instant messaging application

fun Context.share(title: String = String.empty(), message: String, uri: Uri)
fun Context.share(title: String = String.empty(), imageName: String, message: String, bitmap: Bitmap)

Context Extension to share a message with image via social networks or any instant messaging application

Link copied to clipboard
fun Context.shortToast(message: String)

Context Extension to display a Toast with a short duration period in which a customized toast will be displayed