Coder Social home page Coder Social logo

osvr-android-samples's Introduction

OSVR-Android-Samples

This is a set of samples demonstrating basic OSVR usage on Android.

Build instructions

  1. Follow the instructions for building OSVR-Android-Build here: https://github.com/OSVR/OSVR-Android-Build You do not need to install the osvr_server binaries to the device, as these samples currently use the joint client kit functionality.
  2. Once you have a working build of OSVR for Android, set the OSVR_ANDROID environment variable to the install directory of OSVR-Android-Build (by default it's the "install" directory under the build output directory you specified when you configured CMake). Note: it should have lib, bin, and include directories.
  3. Create your local.properties file in /OSVR-Android-Samples/OSVROpenGL, setting your ndk.dir and sdk.dir property values to point to your local downloads of the android SDK and the crystax ndk folders, respectively.
  4. Open the OSVROpenGL project from Android Studio. You should be able to build and run the project from there.

PluginExtractor

Please note the addition of com.osvr.android.utils.OSVRPluginExtractor. This code is based off of code originally authored by Koushik Dutta for the androidmono project under the MIT license. Though modified for OSVR plugin extraction, it remains under the MIT license (see file header for the full license). This will be moved to a separate library.

osvr-android-samples's People

Contributors

jeromiya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osvr-android-samples's Issues

How To?

Have a working build of osvr-android-build in android studio but build fails in vs 2017 community.

Have cmake configured with osvr-andoid environment variable for osvr-android-build but have no ideo what i am supposed to do with osvr-android-samples or what to do with osvr-android build because of

Build instructions

Follow the instructions for building OSVR-Android-Build here: https://github.com/OSVR/OSVR-Android-Build You do not need to install the osvr_server binaries to the device, as these samples currently use the joint client kit functionality.

Could it be possible for anybody to share how they used android studio to get working osvr-android-samples working on on an android device and expand on what is described in https://github.com/OSVR/OSVR-Android-Samples/blob/master/README.md ?

All i want to do is https://www.youtube.com/watch?v=KdoLiMAA2lk

Build 'undefined references' errors

Trying to build example with current OSVR-Android-SDK reports following undefined references:

 /home/malcalde/Documents/Projects/osvr/OSVR-Android-SDK/NDK/osvr/builds/armeabi-v7a/include/osvr/Server/ConfigureServerFromFile.h:101: error: undefined reference to  'osvr::server::ConfigureServer::getSuccessfulPlugins[abi:cxx11]() const'

/home/malcalde/Documents/Projects/osvr/OSVR-Android-SDK/NDK/osvr/builds/armeabi-v7a/include/osvr/Server/ConfigureServerFromFile.h:103: error: undefined reference to 'osvr::server::ConfigureServer::getSuccessfulPlugins[abi:cxx11]() const'

> /home/malcalde/Documents/Projects/osvr/OSVR-Android-SDK/NDK/osvr/builds/armeabi-v7a/include/osvr/Server/ConfigureServerFromFile.h:108: error: undefined reference to 'osvr::server::ConfigureServer::getFailedPlugins[abi:cxx11]() const'
/home/malcalde/Documents/Projects/osvr/OSVR-Android-SDK/NDK/osvr/builds/armeabi-v7a/include/osvr/Server/ConfigureServerFromFile.h:110: error: undefined reference to 'osvr::server::ConfigureServer::getFailedPlugins[abi:cxx11]() const'
/home/malcalde/Documents/Projects/osvr/OSVR-Android-SDK/NDK/osvr/builds/armeabi-v7a/include/osvr/Server/ConfigureServerFromFile.h:123: error: undefined reference to 'osvr::server::ConfigureServer::getSuccessfulInstantiations[abi:cxx11]() const'
/home/malcalde/Documents/Projects/osvr/OSVR-Android-SDK/NDK/osvr/builds/armeabi-v7a/include/osvr/Server/ConfigureServerFromFile.h:126: error: undefined reference to 'osvr::server::ConfigureServer::getSuccessfulInstantiations[abi:cxx11]() const'
/home/malcalde/Documents/Projects/osvr/OSVR-Android-SDK/NDK/osvr/builds/armeabi-v7a/include/osvr/Server/ConfigureServerFromFile.h:131: error: undefined reference to 'osvr::server::ConfigureServer::getFailedInstantiations[abi:cxx11]() const'
/home/malcalde/Documents/Projects/osvr/OSVR-Android-SDK/NDK/osvr/builds/armeabi-v7a/include/osvr/Server/ConfigureServerFromFile.h:133: error: undefined reference to 'osvr::server::ConfigureServer::getFailedInstantiations[abi:cxx11]() const'
collect2: error: ld returned 1 exit status

Any idea how to fix example?.

Thanks in advanced

com_osvr_sensorTracker.so push permission denial (unrooted android)

I tried to push com_osvr_android_sensorTracker.so into the folder that is given in description, but phone doesn't give permission as I don't have root access in my phone. Instead I used the method for ServerLauncher as below

chmod 775 osvr_server
run-as com.osvr.android.gles2sample
cp -R /data/local/tmp/osvr/* files

and the com_osvr_android_sensorTracker.so is in the same folder that is given in description (i.e. /data/data/com.osvr.android.gles2sample/files/lib/osvr-plugins-0), application doesn't display anything (only black screen). Besides this, I'm wondering how it works without server binaries?

Better Activity lifecycle event handling

We currently have event handlers for onCreate, onStart, onStop, onPause, and onResume for the MainActivity. The native code has init, step, and stop methods. init is called in MainActivityView.Renderer.onSurfaceChanged, and stop is called in onStop.

There are some issues with this. The native init method initializes the OpenGL state (good), but it also initializes the OSVR server and context (bad). OSVR should be initialized only once in onCreate, and shutdown only once in onDestroy, which we aren't handling at the moment. We should probably do something useful in onPause and onResume, or maybe onStart and onStop? As in, pause the server somehow?

If you look at the serverThread branch, you'll see an implementation using the server thread instead of joint client kit. Notice how the app crashes when you attempt to start the server a second time in the same process, even with a completely new instance of osvr::server::Server.

Bundle the sensor plugin in the apk

Currently, the sample requires you to manually copy the android sensor plugin to the application's install directory after it is deployed. Modify the sample to bundle this plugin in the apk and copy it to the correct layout/location on the first run, so that a manual adb push is no longer required.

Compiled correctly and can open it on my Shield tablet, but not on my Shield TV. Error with camera

It seems in the Android monitor that the camera is called, which the Shield TV does not have. Seemed to open correctly in the tablet. To verify what I should be looking at, I see solid colored surface that move based on the orientation of the tablet. I attach the USB connector through an OTG adapter, movement with the OSVR HMD does not change the orientation. Is this what I should be seeing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.