一、在服务注册时添加服务的Action,
<service android:name="com.greetty.remoteservice.RemoteService">
<intent-filter >
<action android:name="com.greetty.remote"/>
</intent-filter>
</service>
二、启动远程服务,Action必须和前面注册的Action一样
public void click(View v){
//启动远程服务
Intent intent = new Intent();
intent.setAction("com.greetty.remote");
startService(intent);
}