Install OpenCV 4.1.2 on Raspbian Buster
$ chmod +x *.sh
$ ./download-opencv.sh
$ ./install-deps.sh
$ ./build-opencv.sh
$ cd ~/opencv/opencv-4.1.2/build
$ sudo make install| import java.util.regex.Matcher | |
| import java.util.regex.Pattern | |
| apply plugin: 'com.google.gms.google-services' | |
| apply plugin: 'com.android.application' | |
| apply plugin: 'io.fabric' | |
| buildscript { | |
| repositories { | |
| maven { url 'https://maven.fabric.io/public' } |
| //in your root build.gradle | |
| //--------- Version Increment ----------// | |
| //can call this like `./gradlew incrementVersionCode build` | |
| task incrementVersionCode { | |
| description = "Increments the version code in the version.properties file" | |
| doLast { | |
| File versionPropsFile = file('version.properties') |
| def versionFile = file('version.properties') | |
| ext.buildnum = new Properties([BUILD_NUMBER: "0"]); | |
| if (versionFile.isFile()) { | |
| versionFile.withReader { buildnum.load(it) } | |
| } | |
| def buildNumber = Integer.toString(Integer.parseInt(buildnum.BUILD_NUMBER) + 1) | |
| buildnum.BUILD_NUMBER = buildNumber | |
| task('saveBuildNumber') << { | |
| versionFile.withWriter { buildnum.store(it, "Automated build number increase") } |
| apply from: 'versionCode.gradle' | |
| android { | |
| defaultConfig { | |
| versionName VERSION_NAME | |
| versionCode Integer.parseInt(VERSION_CODE) | |
| } | |
| } |
| # First create the file version.properties with value VERSION_BUILD=0 | |
| # In app/build.gradle: | |
| android { | |
| def versionPropsFile = file('version.properties') | |
| def versionBuild | |
| if (versionPropsFile.canRead()) { | |
| def Properties versionProps = new Properties() | |
| versionProps.load(new FileInputStream(versionPropsFile)) |
Install OpenCV 4.1.2 on Raspbian Buster
$ chmod +x *.sh
$ ./download-opencv.sh
$ ./install-deps.sh
$ ./build-opencv.sh
$ cd ~/opencv/opencv-4.1.2/build
$ sudo make install| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="daichan4649.lockoverlay" | |
| android:versionCode="1" | |
| android:versionName="1.0" > | |
| <uses-sdk | |
| android:minSdkVersion="15" | |
| android:targetSdkVersion="17" /> |
| import kotlinx.coroutines.* | |
| import kotlin.coroutines.* | |
| /** | |
| * Scope interface to control (pause & resume) timeout | |
| */ | |
| interface TimerScope : CoroutineScope { | |
| fun pause() | |
| fun resume() | |
| } |
| import kotlinx.coroutines.* | |
| import kotlinx.coroutines.flow.* | |
| private class Buffer<T> { | |
| private val list = arrayListOf<T>() | |
| @Synchronized | |
| fun add(value: T) { list.add(value) } | |
| @Synchronized |
| /* | |
| This is free and unencumbered software released into the public domain. | |
| Anyone is free to copy, modify, publish, use, compile, sell, or | |
| distribute this software, either in source code form or as a compiled | |
| binary, for any purpose, commercial or non-commercial, and by any | |
| means. | |
| In jurisdictions that recognize copyright laws, the author or authors | |
| of this software dedicate any and all copyright interest in the |