11 2016 档案

摘要:一、 注册JNI函数 1、 静态方法 一般使用javah进行编译,生成很长的文件名和函数名字,这个书写不方便,影响运行效率。 2、 动态注册 使用JNINativeMethod的结构,定义如下: typedef struct { const char* name; //java中函数的名字,不带包路 阅读全文
posted @ 2016-11-28 16:11 winfu 阅读(4043) 评论(0) 推荐(0)
摘要:亲自测试了一个大牛写的shell脚本,感兴趣可以看看,效果如下: 代码如下: 阅读全文
posted @ 2016-11-15 14:19 winfu 阅读(422) 评论(0) 推荐(0)
摘要:用C++来实现Binder服务比较麻烦,原因是没有AIDL的辅助,必须手工来写中间的代码。 首先写一个服务类ExampleServer的代码: 1 class ExampleServer : public BnExampleServer 2 { 3 public : 4 ExampleServer 阅读全文
posted @ 2016-11-14 11:45 winfu 阅读(382) 评论(0) 推荐(0)