This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Read Blog - https://www.ksharma.xyz/android-adb-shortcuts-for-productivity | |
## A11y - Talkback | |
alias TalkbackOn="adb shell settings put secure enabled_accessibility_services com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService" | |
alias TalkbackOff="adb shell settings put secure enabled_accessibility_services com.android.talkback/com.google.android.marvin.talkback.TalkBackService" | |
## A11y - FontSize | |
alias LargeFontSize="adb shell settings put system font_scale 2.0" # Largest font size for android devices | |
alias MediumFontSize="adb shell settings put system font_scale 1.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.security.crypto.MasterKeys | |
import com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm | |
object TinkCryptoManager { | |
// Get / Create Keys using Android Keystore | |
private val aesKeystore = | |
AndroidKeystoreAesGcm(MasterKeys.getOrCreate(MasterKeys.AES256_GCM_SPEC)) | |
fun encrypt(plainText: String): ByteArray = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
implementation("com.google.crypto.tink:tink-android:1.13.0") // check latest version | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity | |
import android.content.Context | |
import android.content.ContextWrapper | |
import android.view.WindowManager.LayoutParams.FLAG_SECURE | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.material3.Text | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Alignment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.DisposableEffect | |
import androidx.compose.ui.platform.LocalLifecycleOwner | |
import androidx.lifecycle.Lifecycle | |
import androidx.lifecycle.LifecycleEventObserver | |
import androidx.lifecycle.LifecycleOwner | |
@Composable | |
fun ComposableLifecycleListener( | |
lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, |