配置Service 在AndroidManifest..xml中,每个Service组件都需要在<application>元素的一个 <service>子元素中进行配置 <service android:name="com.example.zhaokl.chapter08.Myservicel"/> Android软件开发 主讲:王海
Android软件开发 主讲:王海 配置Service • 在AndroidManifest.xml中,每个Service组件都需要在<application>元素的一个 <service>子元素中进行配置 <service android:name="com.example.zhaokl.chapter08.MyService1" />
启动Service 启动Service7有Start和Bind两种方式 Intent intent new Intent(this,MyServicel.class); startService(intent); Android软件开发 主讲:王海
Android软件开发 主讲:王海 启动Service • 启动Service有Start和Bind两种方式 Intent intent = new Intent(this, MyService1.class); startService(intent);