后台服务运行示例
2013-12-06 16:05
246 查看
1、编写MainActivity.java类
View Code
demo下载
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.callstatuslintener" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /> <uses-permission android:name="android.permission.READ_PHONE_STATE"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.example.callstatuslintener.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <service android:name="com.example.callstatuslintener.PhoneStatusService"></service> </application> </manifest>
View Code
demo下载
相关文章推荐
- 将Hive Thrift server 添加到服务后台运行
- weblogic9.1版本后台运行服务
- windows7安装打印机提示“本地打印后台处理程序服务没有运行”
- android学习笔记---40_建立能与访问者进行相互通信的本地服务,后台运行的service
- 如何将应用程序exe注册成服务,直接从后台运行
- 在后台运行Python脚本服务
- python脚本如何在linux下作为服务后台运行
- android本地后台服务示例
- 使用synchronized阻塞后台服务进程,使之一直运行
- 在后台运行Python脚本服务
- 本地打印后台处理程序服务没有运行
- nohup让后台服务运行
- 判断Android后台服务线程(Service类)是否正在运行
- android本地后台服务示例
- linux 后台运行node服务指令
- android中判断服务是否在后台运行的工具类
- [整机笔记][原创]Windows无法连接到打印机,打印机后台程序服务没有运行
- 添加打印机,本地打印后台处理程序服务没有运行
- 2017.7.21 Linux中ELK服务后台运行方式