├── app ├── .gitignore ├── libs │ ├── facetracking.jar │ ├── android-extend.jar │ ├── armeabi │ │ ├── libcache.so │ │ ├── libimage.so │ │ ├── libmpbase.so │ │ ├── librender.so │ │ ├── libserial.so │ │ ├── libvideo.so │ │ └── libArcSoft_FTEngine.so │ └── armeabi-v7a │ │ ├── libcache.so │ │ ├── libimage.so │ │ ├── libmpbase.so │ │ ├── librender.so │ │ ├── libserial.so │ │ ├── libvideo.so │ │ └── libArcSoft_FTEngine.so ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── mipmap-hdpi │ │ │ ├── icon.jpg │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── icon.jpg │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── icon.jpg │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── icon.jpg │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── icon.jpg │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── layout │ │ │ ├── bluetooth_main.xml │ │ │ ├── activity_main.xml │ │ │ ├── activity_camera.xml │ │ │ └── bluetooth_fragment.xml │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ └── drawable │ │ │ └── ic_launcher_background.xml │ │ ├── java │ │ └── com │ │ │ └── hitsz │ │ │ └── autotrack │ │ │ ├── Params.java │ │ │ ├── Application.java │ │ │ ├── FaceDB.java │ │ │ ├── PermissionAcitivity.java │ │ │ ├── MainActivity.java │ │ │ ├── DetecterActivity.java │ │ │ └── BluetoothFragment.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro ├── build.gradle └── app.iml ├── settings.gradle ├── images ├── show.gif └── Screenshot.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── local.properties ├── gradle.properties ├── AutoTrack.iml ├── README.md ├── LICENSE ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /images/show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/images/show.gif -------------------------------------------------------------------------------- /images/Screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/images/Screenshot.png -------------------------------------------------------------------------------- /app/libs/facetracking.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/facetracking.jar -------------------------------------------------------------------------------- /app/libs/android-extend.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/android-extend.jar -------------------------------------------------------------------------------- /app/libs/armeabi/libcache.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi/libcache.so -------------------------------------------------------------------------------- /app/libs/armeabi/libimage.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi/libimage.so -------------------------------------------------------------------------------- /app/libs/armeabi/libmpbase.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi/libmpbase.so -------------------------------------------------------------------------------- /app/libs/armeabi/librender.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi/librender.so -------------------------------------------------------------------------------- /app/libs/armeabi/libserial.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi/libserial.so -------------------------------------------------------------------------------- /app/libs/armeabi/libvideo.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi/libvideo.so -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/libcache.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi-v7a/libcache.so -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/libimage.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi-v7a/libimage.so -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/libmpbase.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi-v7a/libmpbase.so -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/librender.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi-v7a/librender.so -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/libserial.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi-v7a/libserial.so -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/libvideo.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi-v7a/libvideo.so -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AutoTrack 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/libs/armeabi/libArcSoft_FTEngine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi/libArcSoft_FTEngine.so -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-hdpi/icon.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-mdpi/icon.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-xhdpi/icon.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-xxhdpi/icon.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-xxxhdpi/icon.jpg -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/libArcSoft_FTEngine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/libs/armeabi-v7a/libArcSoft_FTEngine.so -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imuncle/AutoTrack/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/java/com/hitsz/autotrack/Params.java: -------------------------------------------------------------------------------- 1 | package com.hitsz.autotrack; 2 | 3 | public class Params { 4 | public static final int DETECT_CONNECT = 8; 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/libraries 5 | /.idea/modules.xml 6 | /.idea/workspace.xml 7 | .DS_Store 8 | /build 9 | /captures 10 | .externalNativeBuild 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jul 27 10:38:59 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/java/com/hitsz/autotrack/Application.java: -------------------------------------------------------------------------------- 1 | package com.hitsz.autotrack; 2 | 3 | public class Application extends android.app.Application { 4 | static FaceDB mFaceDB; 5 | 6 | @Override 7 | public void onCreate() { 8 | super.onCreate(); 9 | mFaceDB = new FaceDB(this.getExternalCacheDir().getPath()); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/java/com/hitsz/autotrack/FaceDB.java: -------------------------------------------------------------------------------- 1 | package com.hitsz.autotrack; 2 | 3 | public class FaceDB { 4 | 5 | public static String appid = "CGJj3PzqWp9QccMUxLy3DRXfUHkBfdx7gLHoNUv2qQzE"; 6 | public static String ft_key = "A58T5CrTnjfeKH1GsY7Csgq1aVCeyLqXeEuG7QjBSwF7"; 7 | 8 | 9 | String mDBPath; 10 | 11 | public FaceDB(String path) { 12 | mDBPath = path; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /local.properties: -------------------------------------------------------------------------------- 1 | ## This file must *NOT* be checked into Version Control Systems, 2 | # as it contains information specific to your local configuration. 3 | # 4 | # Location of the SDK. This is only used by Gradle. 5 | # For customization when using a Version Control System, please read the 6 | # header note. 7 | #Fri Jul 27 10:39:00 CST 2018 8 | ndk.dir=E\:\\Android\\SDK\\ndk-bundle 9 | sdk.dir=E\:\\Android\\SDK 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/bluetooth_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /AutoTrack.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 18 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AutoTrack 2 | 3 | 2018年参加广东省电子设计大赛时的作品,当时拿了省一等奖。作品效果如下: 4 | 5 | ![gif](images/show.gif) 6 | 7 | 软件界面如下: 8 | 9 | ![Screenshot](images/Screenshot.png) 10 | 11 | 作品分为软件部分(Android application)和硬件部分(arduino),两者通过蓝牙连接。硬件部分很简单,只是简单地接收蓝牙数据然后控制舵机转向,运用到了一点点PID算法。 12 | 13 | 这里开源的是**软件部分**,只支持Android,不支持IOS。 14 | 15 | ## 项目详情 16 | 17 | 本项目基于Android Studio开发,这里是精简过后的文件结构,删去了build后的内容,导入Android Studio能正常使用。 18 | 19 | 其中最重要的人脸跟踪部分使用了[虹软](http://www.arcsoft.com.cn/technology/face.html)的免费so库,基于虹软自己的演示demo进行修改,删除了人脸识别功能,只保留了人脸跟踪部分的功能,另外加入了蓝牙功能。 20 | 21 | ## 通信协议 22 | 23 | 字母|含义|速度 24 | :--:|:--:|:--: 25 | a|舵机不动|0 26 | b|舵机向下转动|很慢 27 | c|舵机向下转动|慢 28 | d|舵机向下转动|快 29 | e|舵机向下转动|很快 30 | f|舵机向上转动|很慢 31 | g|舵机向上转动|慢 32 | h|舵机向上转动|快 33 | i|舵机向上转动|很快 34 | l|舵机向左转动|很慢 35 | m|舵机向左转动|慢 36 | n|舵机向左转动|快 37 | o|舵机向左转动|很快 38 | r|舵机向右转动|很慢 39 | s|舵机向右转动|慢 40 | t|舵机向右转动|快 41 | u|舵机向右转动|很快 42 | 43 | ## 遗留问题 44 | 45 | 蓝牙功能很不稳定,特别是连接蓝牙的时候极容易崩溃,目前没有改进的想法。希望借鉴者注意。 46 | 47 | ## 开源协议 48 | 49 | MIT License 50 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | defaultConfig { 6 | applicationId "com.hitsz.autotrack" 7 | minSdkVersion 21 8 | targetSdkVersion 25 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | 20 | sourceSets { 21 | main { 22 | jniLibs.srcDirs = ['libs'] 23 | } 24 | } 25 | } 26 | 27 | dependencies { 28 | implementation 'com.android.support.constraint:constraint-layout:1.1.2' 29 | compile fileTree(dir: 'libs', include: ['*.jar']) 30 | testCompile 'junit:junit:4.12' 31 | compile 'com.android.support:appcompat-v7:25.4.0' 32 | compile 'com.android.support:design:25.4.0' 33 | } 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 big_uncle 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_camera.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 16 | 45 | 46 | 51 | 52 | 58 | 59 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /app/src/main/res/layout/bluetooth_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 |