http://blog.csdn.net/yhaolpz/article/details/51339295 AIDL 传递自定义类型数据 希望对你有帮助。
2016-05-07
http://blog.csdn.net/yhaolpz/article/details/51336753 对远程服务的归纳总结 希望对大家的学习有帮助!
2016-05-07
最赞回答 / alphab
课程中的Demo已经是两个不同的Module,拥有各自不同的进程,因此无需为service指定process。如果是想在一个应用里实现IPC,才需要为service指定不同的process。
2016-05-05
采用setComponent方式代码如下:intent.setComponent(new ComponentName("com.example.tiang.aidlexample","com.example.tiang.aidlexample.IDownloadService"));或者采用如下方式进行绑定:Intent intent = new Intent(this,IDownloadService.class);bindService(intent,connection, Context.BIND_AUTO_CREATE);
2016-04-17
需要在AndroidManifest配置Service,绑定service时采用setAction不成功的原因有可能是由于android 5.0 service需要显式声明导致。
2016-04-17
AIDL注意几个问题:
(1)在服务端注册Service,并且需要android:exported="true"和android:process=":remote"属性。
(2)android:exported="true",这个属性没有配置的时候,报异常java.lang.SecurityException: Not allowed to bind to service Intent。
(3)android:process=":remote"这个属性没有配置的时候,add方法返回的永远都是0,加了之后正常了。
至于原因嘛.......................我怎么会知道(无辜脸)
(1)在服务端注册Service,并且需要android:exported="true"和android:process=":remote"属性。
(2)android:exported="true",这个属性没有配置的时候,报异常java.lang.SecurityException: Not allowed to bind to service Intent。
(3)android:process=":remote"这个属性没有配置的时候,add方法返回的永远都是0,加了之后正常了。
至于原因嘛.......................我怎么会知道(无辜脸)
2016-04-14
已采纳回答 / imooc_幕课网
//调用远程的服务 int res= iMyAidl.add(num2, num1); mEtRes.setText(res);出错在 mEtRes.setText(res);这里。mEtRes.setText(res);中的res是一个int 类型,那么res值对应是values文件夹中的strings.xml里的值。应该改为mEtRes.setText(res+“”);这样就行了
2016-04-11