adb shell cmd -w wifi set-wifi-enabled enable
adb shell cmd -w wifi set-wifi-enabled disable
Quelle: https://stackoverflow.com/a/68794783/5804482
adb shell svc data enable
android { | |
... | |
defaultConfig { | |
... | |
testInstrumentationRunner "com.grumpyshoe.myapplication.core.MockTestRunner" | |
... | |
} | |
... | |
} |
object MockApiService { | |
// all available methods | |
enum class Method { | |
getData | |
} | |
// expatiations | |
private val expectationMap = mutableMapOf<Method, Expectation>() |
class TestAppApplication : Application() { | |
// initialize mock ApiService | |
var mockApiService = MockApiService | |
/** | |
* onCreate | |
* | |
*/ | |
override fun onCreate() { |
class MainViewTest { | |
@Rule | |
@JvmField | |
var testRule = IntentsTestRule(MainActivity::class.java, true, false) | |
// nedded for correct handling of 'postValue' in LiveData | |
@Rule | |
@JvmField | |
var rule: TestRule = InstantTaskExecutorRule() |
String getGitHash() { | |
// git hash | |
def command = Runtime.getRuntime().exec("git rev-parse --short HEAD") | |
def result = command.waitFor() | |
if (result != 0) { | |
throw new IOException("Command 'getGitHash()' exited with " + result) | |
} | |
String gitCommitHash = command.inputStream.text.trim() |
# https://stackoverflow.com/questions/13565082/how-can-i-force-gradle-to-redownload-dependencies | |
# https://discuss.gradle.org/t/how-to-get-gradle-to-download-newer-snapshots-to-gradle-cache-when-using-an-ivy-repository/7344 | |
# You can tell Gradle to re-download some dependencies in the build script by flagging | |
# the dependency as 'changing'. Gradle will then check for updates every 24 hours, but | |
# this can be configured using the resolutionStrategy DSL. I find it useful to use this | |
# for for SNAPSHOT or NIGHTLY builds. | |
configurations.all { | |
// Check for updates every build | |
resolutionStrategy.cacheChangingModulesFor 0, 'seconds' |
adb shell cmd -w wifi set-wifi-enabled enable
adb shell cmd -w wifi set-wifi-enabled disable
Quelle: https://stackoverflow.com/a/68794783/5804482
adb shell svc data enable
package de.grumpyshoe.pdfviewer | |
import android.graphics.Bitmap | |
import android.graphics.pdf.PdfRenderer | |
import android.os.Bundle | |
import android.os.ParcelFileDescriptor | |
import androidx.activity.ComponentActivity | |
import androidx.activity.compose.setContent | |
import androidx.annotation.RawRes | |
import androidx.compose.foundation.Image |
Source: StackOferflow
To see total no of commits you can do as Peter suggested above
git rev-list --count HEAD
And if you want to see number of commits made by each person try this line
git shortlog -s -n
fun Modifier.pinchToZoom( | |
minZoom: Float? = null, | |
maxZoom: Float? = null, | |
): Modifier = composed { | |
var zoom by remember { mutableStateOf(1f) } | |
val state = rememberTransformableState { scaleChange, _, _ -> | |
val newZoom = (zoom * scaleChange).coerceIn(minZoom ?: MIN_VALUE, maxZoom ?: MAX_VALUE) | |
zoom = newZoom | |
} |