http://blog.csdn.net/yhaolpz/article/details/51339295 AIDL 傳遞自定義類型數(shù)據(jù) 希望對你有幫助。
2016-05-07
http://blog.csdn.net/yhaolpz/article/details/51336753 對遠(yuǎn)程服務(wù)的歸納總結(jié) 希望對大家的學(xué)習(xí)有幫助!
2016-05-07
最贊回答 / alphab
課程中的Demo已經(jīng)是兩個不同的Module,擁有各自不同的進(jìn)程,因此無需為service指定process。如果是想在一個應(yīng)用里實現(xiàn)IPC,才需要為service指定不同的process。
2016-05-05
采用setComponent方式代碼如下:intent.setComponent(new ComponentName("com.example.tiang.aidlexample","com.example.tiang.aidlexample.IDownloadService"));或者采用如下方式進(jìn)行綁定: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需要顯式聲明導(dǎo)致。
2016-04-17
AIDL注意幾個問題:
(1)在服務(wù)端注冊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方法返回的永遠(yuǎn)都是0,加了之后正常了。
至于原因嘛.......................我怎么會知道(無辜臉)
(1)在服務(wù)端注冊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方法返回的永遠(yuǎn)都是0,加了之后正常了。
至于原因嘛.......................我怎么會知道(無辜臉)
2016-04-14