Giter Site home page Giter Site logo

Native API about arcore-android-sdk HOT 4 CLOSED

google-ar avatar google-ar commented on June 7, 2024
Native API

from arcore-android-sdk.

Comments (4)

nathanmartz avatar nathanmartz commented on June 7, 2024

Thanks for your feedback on this issue. This is something we're looking at for the future. Given that you can use the JNI to do interop between the existing SDK and C, what are your main reasons for wanting a C API? Is it performance, ease of integration, something else?

from arcore-android-sdk.

JeroMiya avatar JeroMiya commented on June 7, 2024

Ease of integration, mostly. We have a plugin system that allows extensible C modules to be dynamically loaded at runtime, access various VR-related devices, and surface them to applications in a consistent API across platforms. Usually with Java-only Android APIs we have to build up a bridge layer between the Java application and the plugin - that is, the Java application explicitly calls into the support library we provide. Then the data (typically poses, but also gestures, buttons, analog values, etc...) is pushed by the support library (JNI bridge) into a state queue which the plugin consumes and reports poses/analog values/buttons/etc... to the application.

The JNI bridges make it possible, but are cumbersome and cause the VR application to have to leak through the abstraction to get it working - that is, they have to have a Java support library and invoke it to get the data flowing. It's a little clunky and platform-specific, which we'd like to avoid if possible. Additionally, depending on the timing of when data is pushed to the state queue vs consumed by the plugin, this can sometimes add a little latency.

With a C++ API (that doesn't require references to the application, activity, view, etc... from the Java side, if possible), the plugin could be self-contained and the application that uses our middleware doesn't need to write platform specific code when porting their software to take advantage of ARCore. The plugin can also process data as it arrives, ensuring no latency overhead on our side.

from arcore-android-sdk.

nathanmartz avatar nathanmartz commented on June 7, 2024

Thanks for the detailed feedback. I'll send this on to our core SDK team.

from arcore-android-sdk.

inio avatar inio commented on June 7, 2024

Great news: ARCore Developer Preview 2 adds an NDK API!

from arcore-android-sdk.

Related Issues (20)

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.