This is the gist which explains how to use Android predictive back gesture and iOS swipe to go back when using Voyager in Compose multiplatform.
If you are just using Android, you can merge the commonMain stuff and the androidMain stuff.
This is the gist which explains how to use Android predictive back gesture and iOS swipe to go back when using Voyager in Compose multiplatform.
If you are just using Android, you can merge the commonMain stuff and the androidMain stuff.
import androidx.compose.animation.core.Animatable | |
import androidx.compose.animation.core.Spring | |
import androidx.compose.animation.core.animateFloatAsState | |
import androidx.compose.animation.core.spring | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.gestures.detectDragGestures | |
import androidx.compose.foundation.layout.aspectRatio | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.wrapContentSize | |
import androidx.compose.integration.demos.BlockFilter.Companion.Lighting |
# Connect to TV | |
adb connect <TV_IP> | |
# verify devices | |
adb devices | |
# list installed packages | |
adb shell pm list packages -f -3 | |
# list all packages | |
adb shell pm list packages -f |
entity_id: media_player.tcl_tv | |
command: "am start -n com.tcl.tv/.TVActivity" |
/** | |
* Runs `pkg-config`: | |
* https://github.com/JetBrains/kotlin-native/issues/1534#issuecomment-384894431 | |
*/ | |
fun runPkgConfig( | |
vararg packageNames: String, | |
cflags: Boolean = false, | |
libs: Boolean = false): List<String> { | |
val p = ProcessBuilder(*(listOfNotNull( | |
"pkg-config", |
There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.
brew install ffmpeg
apt install ffmpeg
# install openjdk | |
sudo apt-get install openjdk-7-jdk lib32stdc++6 lib32z1 | |
# download android sdk | |
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
tar -xvf android-sdk_r24.2-linux.tgz | |
# install all sdk packages | |
cd android-sdk-linux/tools | |
./android update sdk --no-ui |
adb shell am | |
usage: am [subcommand] [options] | |
usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>] | |
[--R COUNT] [-S] [--opengl-trace] <INTENT> | |
am startservice <INTENT> | |
am force-stop <PACKAGE> | |
am kill <PACKAGE> | |
am kill-all | |
am broadcast <INTENT> | |
am instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w] |