Git Product home page Git Product logo

ledhidl's People

Contributors

anlory avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

ledhidl's Issues

绑定式HAL,java客户端能传对象吗?

绑定式HAL,java客户端调用Service和C++调用能传对象吗?

  1. 实现java调用hidl service的例子
    2.1 添加库:
    将以下内容添加到 Android.mk 中:
    LOCAL_JAVA_LIBRARIES += android.hardware.foo-V1.0-java

    将以下内容添加到 Android.bp 中:
    shared_libs: [
    /* … /
    "android.hardware.foo-V1.0-java",
    ],
    该库还存在静态版:android.hardware.foo-V1.0-java-static。
    2.2 将以下内容添加到您的 Java 文件中:
    import android.hardware.foo.V1_0.IFoo;
    ...
    // retry to wait until the service starts up if it is in the manifest
    IFoo server = IFoo.getService(true /
    retry /); // throws NoSuchElementException if not available
    IFoo anotherServer = IFoo.getService("second_impl", true /
    retry */);
    server.doSomething(…);

  2. 实现C++ 调用hidl service的例子
    首先将 HAL 库添加到 makefile 中:
    Make:LOCAL_SHARED_LIBRARIES += [email protected]
    Soong:shared_libs: [ …, [email protected] ]
    接下来,添加 HAL 头文件:
    #include <android/hardware/nfc/1.0/IFoo.h>

    // in code:
    sp client = IFoo::getService();
    client->doThing();

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.