当前位置: 首页 > news >正文

公司网站规划案例怎么做网站营销

公司网站规划案例,怎么做网站营销,垡头网站建设,重庆建设工程信息网怎么查证书接上回#xff0c;继续第三种方式#xff0c;是手动生成 service binder 的方法,项目结构 1#xff0c;编译aidl aidl 文件保持不变#xff0c;如何生成Bn和Bp 文件呢。 aidl -I ./libserviceaidl/aidl -h ./ -o ./ --langcpp libserviceaidl/aidl/com/test/IService.a…书接上回继续第三种方式是手动生成 service binder 的方法,项目结构 1编译aidl aidl 文件保持不变如何生成Bn和Bp 文件呢。 aidl -I ./libserviceaidl/aidl -h ./ -o ./ --langcpp libserviceaidl/aidl/com/test/IService.aidl aidl -I ./libserviceaidl/aidl -h ./ -o ./ --langcpp libserviceaidl/aidl/com/test/IServiceCallback.aidl -I aidi 文件目录  -h头文件生成路径  -o cpp文件存放路径 2Native service 差别不大 #define LOG_TAG testservverfirst #include log/log.h#include unistd.h #include stdlib.h #include utils/RefBase.h #include utils/Log.h #include binder/TextOutput.h #include binder/IInterface.h #include binder/IBinder.h #include binder/ProcessState.h #include binder/IServiceManager.h #include binder/IPCThreadState.h #include termios.h #include utils/String16.h #include com/test/BnService.h #include com/test/BnServiceCallback.husing namespace std; using namespace android;class TestService : public com::test::BnService {public:TestService(){}binder::Status nativecall(int i) {ALOGI(server nativecall function is running %d,i);if(mycallback ! nullptr){mycallback-onEventString(4,String16(callbacksuccuess));}return binder::Status();}binder::Status callMcu(int32_t file,const vectoruint8_t type, int32_t* _aidl_return){*_aidl_return 1;ALOGI(server callMcu function is running _aidl_return,*_aidl_return);return binder::Status();}binder::Status call(int32_t type){ALOGI(server call function is running call %d,type);return binder::Status();}// 实现回调注册binder::Status registerCallback(const spcom::test::IServiceCallback callback){mycallback callback;return binder::Status();}private:sp::com::test::IServiceCallback mycallback;};int main(int argc, char const *argv[]) {ALOGD(Server is runing);defaultServiceManager()-addService(String16(TestService), new TestService());ProcessState::self()-startThreadPool();IPCThreadState::self()-joinThreadPool();return 0; }C 调用前面有介绍最后补充下java 的调用方式。 3Java 调用 try {Class? clazz Class.forName(android.os.ServiceManager);Method method clazz.getMethod(getService,String.class);IBinder binder (IBinder) method.invoke(null,TestService);if (binder ! null){IService iservice IService.Stub.asInterface(binder);// 千万不要忘记注册iservice.registerCallback(mycallback);iservice.call(1);} } catch (ClassNotFoundException | NoSuchMethodException e) {e.printStackTrace(); } catch (IllegalAccessException e) {e.printStackTrace(); } catch (InvocationTargetException e) {e.printStackTrace(); } catch (RemoteException e) {e.printStackTrace(); }或者系统里面 IService.Stub.asInterface(ServiceManager.getService(TestService)); 参考 [Android AIDL系列 1] 手动编译aidl文件生成Java、C[android]、C[ndk]、Rust接口_aidl c-CSDN博客
http://www.tj-hxxt.cn/news/131423.html

相关文章:

  • 商务网站建设实验记录东莞市住建局官网
  • 网站tdk优化文档廊坊seo软件
  • 焦作公司做网站网站页面设计图片素材
  • 用商标做网站名字启信宝企业查询官网
  • 怎么在百度搜索自己的网站中国风网站怎么配色
  • 怎么给自己的网站做扫描码中国住房和城乡建设部网站
  • 企业网站建设存在的问题高平企业网站
  • 网站设计的五大要素海口网站建设美丽
  • 合肥建设学校网站安阳网站建设哪家专业
  • 阿里巴巴网官方网站怀化网站排名优化
  • 温州网站推广驭明方太官方网站的建设情况
  • 飞猪旅游的网站建设策划专业网站
  • icp网站信息企业网站设计原则
  • 手机网站排名天猫出售
  • 网站的域名都有哪些问题互联网电商平台
  • 自网站EXCel数据导入怎么做品牌型网站建设特点
  • 网页制作与网站建设》在线作业 答案什么人适合学ui设计
  • 嘉兴建设教育网站成都官方网站建设
  • 商城网站源码下载网站的后台登录注册怎么做
  • 邢台做移动网站的公司企业品牌推广公司哪家好
  • 网站title怎么修改网站上动态图片怎么做
  • 在哪买网站链接公司网站布局
  • 无锡专业做网站的wordpress添加自定义模板
  • 网站和网页的区别在于网站建设是属现代服务吗
  • 常熟企业建设网站公司网站推广怎么样做
  • 实验中心网站建设做雷达干扰的网站
  • 整形网站专题素材网页app制作教程
  • 网页设计网站模板素材花店网站建设课程设计论文
  • 福州仓山区网站建设东莞做网站企业
  • 网站开发前端兼职通讯数码网站