一、整体工程图
二、首先创建在两个工程中都创建RemoteWebPage.aidl,然后分别在gen目录下生成了RemoteWebPage.java
package com.braincol.aidl.service;
interface RemoteWebPage {
String getCurrentPageUrl();
}
三、在RemoteService实现接口,并且在onBind方法中返回IBinder对象。
package com.braincol.aidl.service;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
/**
*
* @author chenzheng_java
* @description 提供服务的service
*
*/
public class RemoteService extends Service {
private final static String TAG = "RemoteService";
&