Skip to content

Instantly share code, notes, and snippets.

@NwetNwetWai
NwetNwetWai / ConnectivityUtil.kt
Created October 11, 2024 02:40 — forked from iamriajul/ConnectivityUtil.kt
Android Kotlin utility class for checking device's network connectivity and speed and internet availability. - You may use this with DI system easily.
package org.dailyislam.android.utilities
import android.content.Context
import android.net.ConnectivityManager
import android.net.NetworkInfo
import android.telephony.TelephonyManager
import java.net.InetAddress
class ConnectivityUtil(private val applicationContext: Context) {
@NwetNwetWai
NwetNwetWai / QrScannerScreen.android.kt
Last active September 26, 2024 04:06 — forked from oianmol/QrScannerScreen.android.kt
QR Code Scanner with Jetbrains Jetpack compose multiplatform!
import android.Manifest
import android.content.pm.PackageManager
import android.util.Log
import android.view.ViewGroup
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.camera.core.CameraSelector
import androidx.camera.core.ImageAnalysis
import androidx.camera.core.Preview
import androidx.camera.lifecycle.ProcessCameraProvider