This application does not collect or store personal data.
If you installed this application from Google Play, take a look at https://policies.google.com/privacy.
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
FROM eclipse-temurin:21-jdk | |
LABEL maintainer "Simon Marquis <[email protected]>" | |
LABEL description "A Docker image for Android devs." | |
LABEL version "1.0.0" | |
ARG CMD_LINE_VERSION=11076708 | |
ARG ANDROID_VERSION=34 | |
ARG ANDROID_BUILD_TOOLS_VERSION=34.0.0 |
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 kotlin.reflect.KClass | |
fun <T : Any> KClass<T>.sealedObjectInstances() = recursiveSealedObjectInstances() | |
private tailrec fun <T : Any> KClass<T>.recursiveSealedObjectInstances( | |
sealedSubclasses: List<KClass<out T>> = listOf(this), | |
acc: Set<T> = emptySet(), | |
): Set<T> = when { | |
sealedSubclasses.isEmpty() -> acc | |
else -> recursiveSealedObjectInstances( |
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 java.util.Optional; | |
import java.util.concurrent.atomic.AtomicReference; | |
public abstract class LazyGetter<T> { | |
private final AtomicReference<Optional<T>> mCachedValue = new AtomicReference<>(Optional.<T>empty()); | |
public final T get() { | |
Optional<T> value = mCachedValue.get(); | |
if (!value.isPresent()) { |
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.app.Dialog; | |
import android.app.Fragment; | |
import android.os.Build; | |
import android.support.annotation.RequiresApi; | |
import android.view.SurfaceView; | |
import android.view.Window; | |
import android.view.WindowManager; | |
/** |
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.Manifest; | |
import android.animation.Keyframe; | |
import android.animation.ObjectAnimator; | |
import android.animation.PropertyValuesHolder; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.pm.PackageManager; | |
import android.content.res.Configuration; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; |
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
file=$(date +%Y.%m.%d-%H.%M.%S).mp4 \ | |
&& path="/sdcard/$file" \ | |
&& time=${1-30} \ | |
&& bitrate=${2-20000000} \ | |
&& adb shell screenrecord --time-limit "$time" --bit-rate "$bitrate" "$path" \ | |
&& echo "Success" \ | |
&& echo "Uploading..." \ | |
&& adb pull "$path" \ | |
&& adb shell rm "$path" \ | |
&& echo "Screencapture saved at $(pwd)/$file" \ |
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
file=$(date +%Y.%m.%d-%H.%M.%S).png \ | |
&& path="/sdcard/$file" \ | |
&& adb shell screencap -p "$path" \ | |
&& adb pull "$path" \ | |
&& adb shell rm "$path" \ | |
&& echo "Screenshot saved at $(pwd)/$file" \ | |
|| echo "Screenshot failed" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="scheme.js"></script> | |
<script type="text/javascript"> | |
// myscheme://init?param1=value1¶m2=value2 | |
var scheme = "myscheme"; | |
var data = "init?param1=value1¶m2=value2"; | |
var packagename = "com.example.scheme"; | |
</script> |