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
public void onCLick(View view) { | |
String cmd = "monkey -p com.google.android.calculator --throttle 200 -v 10000"; | |
try { | |
final Process p = Runtime.getRuntime().exec(cmd); | |
new Thread(() -> { | |
try { | |
InputStreamReader isr = new InputStreamReader (p.getInputStream()); | |
BufferedReader br = new BufferedReader(isr); | |
while (true) { | |
String s = br.readLine (); |
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
cd ${WORKSPACE} | |
rm -rf local.properties | |
echo "sdk.dir=/home/jenkins/tools/android-sdk-linux/" > local.properties | |
echo "ndk.dir=/home/jenkins/tools/android-ndk-r14b/" >> local.properties | |
#license | |
mkdir -p /home/jenkins/tools/android-sdk-linux/licenses | |
echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > /home/jenkins/tools/android-sdk-linux/licenses/android-sdk-license | |
echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> /home/jenkins/tools/android-sdk-linux/licenses/android-sdk-license |
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
#!/bin/bash | |
export image_name="android:5.0" | |
export container_name=${USER}_${image_name} | |
if [ ! "$(docker ps -q -f name=${container_name})" ] | |
then | |
if [ "$(docker ps -aq -f status=exited -f name=${container_name})" ]; then | |
# cleanup | |
docker rm ${container_name} | |
fi | |
# run your container |
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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:3.2.1' |
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
// | |
// Created by vntrong on 10/20/2017. | |
// | |
#ifndef ANDROID_UTILS_H | |
#define ANDROID_UTILS_H | |
#include <jni.h> | |
#include <string.h> | |
#include <string> |