Skip to content
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

Merged
merged 10 commits into from
Dec 27, 2017

Conversation

icarpis
Copy link
Contributor

@icarpis 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.

icarpis and others added 7 commits November 27, 2017 14:53
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
@dorodnic dorodnic changed the title Android Support Reference code for building on Android Dec 25, 2017
Change-Id: I544d3b0dc015b6f884a82fa587a4b73eb3cb4a45
@@ -163,10 +163,14 @@ class dispatcher
item(time);
}

#ifndef ANDROID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong...

@@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this required?

Copy link
Contributor Author

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.

Copy link
Collaborator

@ev-mp ev-mp left a 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;
Copy link
Collaborator

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 ?

Copy link
Contributor Author

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`.
Copy link
Collaborator

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

Copy link
Contributor Author

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} )
Copy link
Collaborator

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

icarpis and others added 2 commits December 26, 2017 11:16
Change-Id: Ie077b999989bbbc783d9254767daf9cdcd2c49dc
@dorodnic dorodnic merged commit b0ef562 into IntelRealSense:development Dec 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants