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