Search Results for: String instruments
aidl文件路径如下: frameworks/base/core/java/com/example/utils/ .isystemevent.aidl 内容如下: package com.example.utils; import com.example.utils.ieventcallback; interface isystemevent { void registercallback(ieventcallback callback); void unregistercallback(ieventcallback callback); void sendevent(int type, string
value); } .ieventcallback.aidl 内容如下 package com.example.utils; interface ieventcallback { oneway void onsystemevent(int type, string value); } aidl文件编写, 教程很多, 我这里就不详细说明了, 需要注意的是, 由于我们要实现回调功能, 所以必须写一个回调接口 ieventcallback, 另外aidl文件中 oneway 关键字表明调用此函数不会阻塞当前线程, 调用端调用此函数会立即返回, 接收端收到函数调用是在binder线程池中的某个线程中....
http://www.iis7.com/a/nr/0612790.html