├── MediaManagerDemo ├── settings.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── raw │ │ │ │ │ └── keep.xml │ │ │ │ ├── drawable │ │ │ │ │ ├── back_button_press.png │ │ │ │ │ ├── back_button_disable.png │ │ │ │ │ ├── back_button_normal.png │ │ │ │ │ ├── background_selector.xml │ │ │ │ │ ├── round_btn_normal.xml │ │ │ │ │ ├── round_btn_disable.xml │ │ │ │ │ ├── round_btn_pressed.xml │ │ │ │ │ ├── selector_back_button.xml │ │ │ │ │ └── round_btn.xml │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ └── layout │ │ │ │ │ ├── prompt_input_position.xml │ │ │ │ │ ├── media_info_item.xml │ │ │ │ │ ├── activity_connection.xml │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ └── activity_default_layout.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── dji │ │ │ │ │ └── mediaManagerDemo │ │ │ │ │ ├── MApplication.java │ │ │ │ │ ├── DefaultLayoutActivity.java │ │ │ │ │ ├── DemoApplication.java │ │ │ │ │ ├── ConnectionActivity.java │ │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── dji │ │ │ │ └── mediaManagerDemo │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── dji │ │ │ └── mediaManagerDemo │ │ │ └── ExampleInstrumentedTest.java │ ├── .gitignore │ ├── build.gradle │ └── proguard-rules.pro ├── build.gradle ├── gradlew.bat └── gradlew ├── LICENSE.txt ├── .gitignore └── README.md /MediaManagerDemo/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /MediaManagerDemo/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4608M 2 | android.useAndroidX=true 3 | android.enableJetifier=true -------------------------------------------------------------------------------- /MediaManagerDemo/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/raw/keep.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/drawable/back_button_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/drawable/back_button_press.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/drawable/back_button_disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/drawable/back_button_disable.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/drawable/back_button_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/drawable/back_button_normal.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/Android-MediaManagerDemo/HEAD/MediaManagerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /MediaManagerDemo/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Sep 29 16:38:55 CST 2019 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-7.1-all.zip 7 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/drawable/background_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/drawable/round_btn_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/drawable/round_btn_disable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/drawable/round_btn_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/drawable/selector_back_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #000000 7 | #FFFFFF 8 | #242d34 9 | #00000000 10 | #80000000 11 | 12 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/test/java/com/dji/mediaManagerDemo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.dji.mediaManagerDemo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MediaManagerDemo 3 | Settings 4 | Disconnected 5 | Product Information 6 | Status: No Product Connected 7 | Model Not Available 8 | Push Info 9 | DJI SDK Version: %1$s 10 | 11 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/drawable/round_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /MediaManagerDemo/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | jcenter() 7 | mavenCentral() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:4.2.2' 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | jcenter() 21 | mavenCentral() 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | gradle/ 19 | build/ 20 | gradlew 21 | gradlew.bat 22 | 23 | # Local configuration file (sdk path, etc) 24 | local.properties 25 | 26 | # Proguard folder generated by Eclipse 27 | proguard/ 28 | 29 | # Log Files 30 | *.log 31 | 32 | # Android Studio Navigation editor temp files 33 | .navigation/ 34 | 35 | # Android Studio captures folder 36 | captures/ 37 | 38 | # Intellij 39 | *.iml 40 | .idea/ 41 | .idea/* 42 | .idea/libraries 43 | 44 | # Keystore files 45 | *.jks 46 | 47 | .DS_Store 48 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/java/com/dji/mediaManagerDemo/MApplication.java: -------------------------------------------------------------------------------- 1 | package com.dji.mediaManagerDemo; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | 6 | import com.secneo.sdk.Helper; 7 | 8 | public class MApplication extends Application { 9 | 10 | private DemoApplication demoApplication; 11 | @Override 12 | protected void attachBaseContext(Context paramContext) { 13 | super.attachBaseContext(paramContext); 14 | Helper.install(MApplication.this); 15 | if (demoApplication == null) { 16 | demoApplication = new DemoApplication(); 17 | demoApplication.setContext(this); 18 | } 19 | } 20 | 21 | @Override 22 | public void onCreate() { 23 | super.onCreate(); 24 | demoApplication.onCreate(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/androidTest/java/com/dji/mediaManagerDemo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.dji.mediaManagerDemo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.dji.mediaManagerDemo", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/layout/prompt_input_position.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | Copyright (c) 2019 DJI 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | obj/ 15 | DJI-SDK-LIB_3.1/build/ 16 | build/ 17 | 18 | # generated file 19 | lint.xml 20 | 21 | # Local configuration file (sdk/lib path, etc) 22 | local.properties 23 | project.properties 24 | 25 | # Eclipse project files 26 | .classpath 27 | .settings/ 28 | 29 | # Proguard folder generated by Eclipse 30 | proguard/ 31 | 32 | # Intellij project files 33 | *.iml 34 | *.ipr 35 | *.iws 36 | .idea/ 37 | 38 | # Mac files 39 | .DS_Store 40 | 41 | # Gradle generated files 42 | .gradle/ 43 | 44 | # Signing files 45 | .signing/ 46 | 47 | # User-specific configurations 48 | .idea/libraries/ 49 | .idea/workspace.xml 50 | .idea/tasks.xml 51 | .idea/.name 52 | .idea/compiler.xml 53 | .idea/copyright/profiles_settings.xml 54 | .idea/encodings.xml 55 | .idea/misc.xml 56 | .idea/modules.xml 57 | .idea/scopes/scope_settings.xml 58 | .idea/vcs.xml 59 | *.iml 60 | 61 | # OS-specific files 62 | .DS_Store 63 | .DS_Store? 64 | ._* 65 | .Spotlight-V100 66 | .Trashes 67 | ehthumbs.db 68 | Thumbs.db 69 | 70 | # Import summary file 71 | import-summary.txt 72 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/java/com/dji/mediaManagerDemo/DefaultLayoutActivity.java: -------------------------------------------------------------------------------- 1 | package com.dji.mediaManagerDemo; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.view.View; 6 | import android.widget.Button; 7 | 8 | import androidx.appcompat.app.AppCompatActivity; 9 | 10 | import dji.keysdk.ProductKey; 11 | import dji.ux.widget.FPVWidget; 12 | 13 | public class DefaultLayoutActivity extends AppCompatActivity implements View.OnClickListener{ 14 | 15 | private Button mMediaManagerBtn; 16 | private FPVWidget fpvWidget; 17 | 18 | @Override 19 | protected void onCreate(Bundle savedInstanceState) { 20 | super.onCreate(savedInstanceState); 21 | setContentView(R.layout.activity_default_layout); 22 | mMediaManagerBtn = (Button)findViewById(R.id.btn_mediaManager); 23 | fpvWidget = findViewById(R.id.fpv_widget); 24 | mMediaManagerBtn.setOnClickListener(this); 25 | } 26 | 27 | @Override 28 | public void onClick(View v) { 29 | if (v.getId() == R.id.btn_mediaManager) { 30 | Intent intent = new Intent(this, MainActivity.class); 31 | startActivity(intent); 32 | } 33 | } 34 | 35 | @Override 36 | protected void onResume() { 37 | super.onResume(); 38 | fpvWidget.updateWidget(ProductKey.create(ProductKey.MODEL_NAME)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Android-MediaManagerDemo 2 | 3 | ## Introduction 4 | 5 | This demo is designed for you to learn how to use `MediaManager` to interact with the file system on the SD card of the aircraft's camera. You can use it to preview photos, play videos, download or delete files and so on. 6 | 7 | ## Requirements 8 | 9 | - Android Studio 4.2.1 10 | - Android System 5.0.0+ 11 | - DJI Android SDK 4.16.1 12 | - DJI Android UXSDK 4.16 13 | 14 | ## Supported DJI Products 15 | 16 | - Mavic 2 Series 17 | - Mavic Air 18 | - Mavic Pro 19 | - Spark 20 | - Phantom 4 Pro 21 | - Phantom 4 Advanced 22 | - Inspire 2 23 | 24 | ## Tutorial 25 | 26 | For this demo's tutorial: **Creating a Media Manager Application**, please refer to . 27 | 28 | ## Feedback 29 | 30 | We’d love to hear your feedback on this demo and tutorial. 31 | 32 | Please use [DJI Support] (https://djisdksupport.zendesk.com/hc/requests/new) when you meet any problems of using this demo. At a minimum please let us know: 33 | 34 | * Which DJI Product you are using? 35 | * Which Android Device and Android system version you are using? 36 | * Which Android Studio version you are using? 37 | * A short description of your problem includes debugging logs or screenshots. 38 | * Any bugs or typos you come across. 39 | 40 | ## License 41 | 42 | Android-MediaManagerDemo is available under the MIT license. Please see the LICENSE file for more info. 43 | 44 | ## Join Us 45 | 46 | DJI is looking for all kinds of Software Engineers to continue building the Future of Possible. Available positions in Shenzhen, China and around the world. If you are interested, please send your resume to . For more details, and list of all our global offices, please check . 47 | 48 | DJI 招软件工程师啦,based在深圳,如果你想和我们一起把DJI产品做得更好,请发送简历到 . 详情请浏览 . 49 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/layout/media_info_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | 27 | 28 | 36 | 37 | 45 | 46 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /MediaManagerDemo/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 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 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 Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /MediaManagerDemo/app/src/main/res/layout/activity_connection.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 20 | 21 | 33 | 34 | 43 | 44 |