android开机启动service,适合闹钟程序 实例中一共三个类
1.public class YourReceiver extends BroadcastReceiver
2.public class ServiceTest extends Service
3.public class ShowActivity extends Activity
1.yourReceiver 类:
2.复制代码ServiceTest 类:
3.复制代码showActivity 类:(.此类中啥都没有,就是演示一下activity可以被启动)
4.复制代码下面是很重要的AndroidManifest
既可以作为开机启动并隐藏到后台的service,也可以当做activity打开