-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reference code for building on Android #942
Conversation
icarpis
commented
Dec 25, 2017
- Added LibUsb backend as a third-party for Linux, mac and Android OS. (LibUsb on Windows is currently unavailable)
- Added some changes for Android build
- Added Android MD files of how to builds the RealSense SDK samples for Android and how to build and Android application to streaming with RealSense cameras.
Change-Id: Iac4a316121fcbdf7104e5714e98b5cbc8b47d60d
Change-Id: Iaf61c313c378d51535c65e8e06a938d890277ef2 Update Android.md Update AndroidNativeSamples.md Update AndroidJavaApp.md Update AndroidNativeSamples.md Update Android.md Update AndroidJavaApp.md Update AndroidJavaApp.md Update readme.md Update Android.md
Change-Id: I544d3b0dc015b6f884a82fa587a4b73eb3cb4a45
@@ -163,10 +163,14 @@ class dispatcher | |||
item(time); | |||
} | |||
|
|||
#ifndef ANDROID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong...
third-party/json.hpp
Outdated
@@ -10374,7 +10374,8 @@ class basic_json | |||
*/ | |||
long double str_to_float_t(long double* /* type */, char** endptr) const | |||
{ | |||
return std::strtold(reinterpret_cast<typename string_t::const_pointer>(m_start), endptr); | |||
using namespace std; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a issue regarding this, look here: nlohmann/json#136
I'll replace the json.hpp with the latest release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing libusb with custom version requires changes to installation.md and the debian packages.
fi | ||
|
||
# Install linux required packages | ||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then | ||
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test; | ||
sudo apt-get update; | ||
sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev; | ||
sudo apt-get install -qq libusb-1.0-0-dev; | ||
sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev libudev-dev; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the -qq package appear in installation.md ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, libudev-dev should be added to the installation.md
1. [Root](https://www.wikihow.tech/Root-Android-Phones) your Android device. | ||
2. Download the [Native Development Kit (NDK)](https://developer.android.com/ndk/downloads/index.html) for Linux to your host machine. | ||
3. Install [CMake](https://cmake.org/) 3.6.1 or newer. | ||
4. Download [ADB](https://developer.android.com/studio/command-line/adb.html) to the host machine by typing `sudo apt-get install adb`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo apt-get install -qq appears in Travis but not here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's required only in Linux
|
||
# Links the target library to the log library | ||
# included in the NDK. | ||
${log-lib} ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add empty line at the file end
Change-Id: Ie077b999989bbbc783d9254767daf9cdcd2c49dc