From e8a4cb5ff288a559b82b4fc96362d2e6c27d1980 Mon Sep 17 00:00:00 2001 From: AnnaRomanov Date: Tue, 25 Sep 2018 18:42:18 +0300 Subject: [PATCH 1/3] Added instruction to android studio tutorial --- doc/android/AndroidJavaApp.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/doc/android/AndroidJavaApp.md b/doc/android/AndroidJavaApp.md index ea75c9bdcb..45135fbfc7 100644 --- a/doc/android/AndroidJavaApp.md +++ b/doc/android/AndroidJavaApp.md @@ -38,13 +38,24 @@ Click on `configure` and choose `SDK Manager`. 12. Replace the content of `MainActivity`, `native-lib.cpp`, `activity_main.xml` and `CMakeLists.txt` with [MainActivity](MainActivity.java_), [native-lib.cpp](./native-lib.cpp_), [activity_main.xml](./activity_main.xml_) and [CMakeLists.txt](./CMakeLists.txt_) respectively.

-13. Connect the Android device to the host machine. +13. In the `Gradle Scripts` section, go to the module-level `build.gradle` file. In the `defaultConfig` block, add an `ndk` block and configure the `abiFilters` option with `armeabi-v7a`: +```android { + ... + defaultConfig { + ... + ndk { + abiFilters 'armeabi-v7a' + } + } +}``` + +14. Connect the Android device to the host machine. Click on `Run` and choose `Run 'app'`. Choose your Android device and click on the `OK` button. At the end of this process a new application supposed to appear at the Android device.

-14. Install [Terminal Emulator](https://en.wikipedia.org/wiki/Terminal_emulator) on your Android device from Google Play Store. -15. Use the USB OTG cable to connect the RealSense camera to your Android device. -16. Open the Terminal Emulator application and type below lines in order to move to Super User mode and change the USB permissions. +15. Install [Terminal Emulator](https://en.wikipedia.org/wiki/Terminal_emulator) on your Android device from Google Play Store. +16. Use the USB OTG cable to connect the RealSense camera to your Android device. +17. Open the Terminal Emulator application and type below lines in order to move to Super User mode and change the USB permissions. ```shell su setenforce 0 @@ -53,7 +64,7 @@ chmod 0777 /dev/bus/usb// ```

-17. Open the `realsense_app` application. +18. Open the `realsense_app` application. ## Expected Output * Streaming Depth data using rooted Samsung Galaxy S4 device. From 9abfed7d6e2dd36da5469632aca23aed662b2b54 Mon Sep 17 00:00:00 2001 From: AnnaRomanov Date: Tue, 25 Sep 2018 18:47:44 +0300 Subject: [PATCH 2/3] fixed formatting --- doc/android/AndroidJavaApp.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/android/AndroidJavaApp.md b/doc/android/AndroidJavaApp.md index 45135fbfc7..689cba619b 100644 --- a/doc/android/AndroidJavaApp.md +++ b/doc/android/AndroidJavaApp.md @@ -39,7 +39,8 @@ Click on `configure` and choose `SDK Manager`.

13. In the `Gradle Scripts` section, go to the module-level `build.gradle` file. In the `defaultConfig` block, add an `ndk` block and configure the `abiFilters` option with `armeabi-v7a`: -```android { +``` +android { ... defaultConfig { ... @@ -47,7 +48,8 @@ Click on `configure` and choose `SDK Manager`. abiFilters 'armeabi-v7a' } } -}``` +} +``` 14. Connect the Android device to the host machine. Click on `Run` and choose `Run 'app'`. Choose your Android device and click on the `OK` button. At the end of this process a new application supposed to appear at the Android device. From 8e0d1c148278bd071d5948eabc18596c020d923e Mon Sep 17 00:00:00 2001 From: AnnaRomanov Date: Tue, 25 Sep 2018 19:16:00 +0300 Subject: [PATCH 3/3] Fixed formatting --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b85e6968d..cf94978227 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -801,7 +801,9 @@ if (NOT USE_SYSTEM_LIBUSB) PATCH_COMMAND "" SOURCE_DIR "third-party/libusb/" - CMAKE_ARGS -DCMAKE_CXX_STANDARD_LIBRARIES=${CMAKE_CXX_STANDARD_LIBRARIES} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/libusb_install + CMAKE_ARGS -DCMAKE_CXX_STANDARD_LIBRARIES=${CMAKE_CXX_STANDARD_LIBRARIES} + -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} + -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/libusb_install TEST_COMMAND "" )