service的隐式启动和显示启动
2011-11-25 08:53
253 查看
隐式启动
<service android:name=".service">
<intent-filer>
<action android:name="com.android.service"/>
<intent-filer>
</service>
final Intent serviceIntent=new Intent();
serviceIntent.setAction("com.android.service");
显示启动
final Intent serviceIntent=new Intent(this,service.class);
startService(serviceIntent);
如果在同一个包中。两者都可以用。在不同包时。只能用隐式启动
<service android:name=".service">
<intent-filer>
<action android:name="com.android.service"/>
<intent-filer>
</service>
final Intent serviceIntent=new Intent();
serviceIntent.setAction("com.android.service");
显示启动
final Intent serviceIntent=new Intent(this,service.class);
startService(serviceIntent);
如果在同一个包中。两者都可以用。在不同包时。只能用隐式启动
相关文章推荐
- Service隐式显示启动
- service的隐式启动和显示启动
- 启动远程service的两种方式:显示和隐式
- Intent用法和回顾(显示,隐式,传参,跳转,启动电话,网页,短信)
- 针对Android Service不能隐式启动的问题
- Web Deploy安装时显示Web Management Service无法启动
- AIDL通信 android 在5.0以使用隐式Intent方式来启动Service的问题
- Android 5.0之后隐式声明Intent 启动Service引发的问题
- sharepoint 2010 启动工作流时,该表单无法显示,可能是由于Microsoft SharePoint Server State Service 配置不当.
- 安装zookeeper时候,可以查看进程启动,但是状态显示报错:Error contacting service. It is probably not running
- Activity的显示启动和隐式启动
- Android 5.0 不再允许使用隐式Intent来启动Service
- Android窗口管理服务WindowManagerService显示Activity组件的启动窗口(Starting Window)的过程分析
- Android 5.0之后隐式声明Intent 启动Service引发的问题
- Android窗口管理服务WindowManagerService显示Activity组件的启动窗口(Starting Window)的过程分析
- Windows Process Activation Service启动失败,显示系统找不到指定路径
- Android窗口管理服务WindowManagerService显示Activity组件的启动窗口(Starting Window)的过程分析
- Android窗口管理服务WindowManagerService显示Activity组件的启动窗口(Starting Window)的过程分析
- Android窗口管理服务WindowManagerService显示Activity组件的启动窗口(Starting Window)的过程分析
- Activity显示启动方式和隐式启动方式