2014年2月27日

Notification Manager 总结

摘要: 1、定义notification,可以放在Activity或Service类中 //NF1:notification 通知 private Notification mNotification; private NotificationManager mNotificationManager; private final static int NOTIFICATION_ID = 0x0001; //通知的ID一、标准Notification1、设置Notification,可以放在Oncreate函数里//NF2:设置Notification mNotific... 阅读全文

posted @ 2014-02-27 16:59 clarenceV1 阅读(390) 评论(0) 推荐(0) 编辑

自动检查软件版本并更新

摘要: http://pan.baidu.com/s/1eQqXb0m 阅读全文

posted @ 2014-02-27 14:19 clarenceV1 阅读(136) 评论(0) 推荐(0) 编辑

防止服务被杀死的方法

摘要: //注册Intent.ACTION_TIME_TICK过滤器的接收器,每分钟接收一次 IntentFilter filter = new IntentFilter(Intent.ACTION_TIME_TICK); NoKillReceiver receiver = new NoKillReceiver(); registerReceiver(receiver, filter); MainActivity.startActivity=this;//接收器代码,接收一次就判断需要打开的服务是否还在运行,如果已经被关闭折... 阅读全文

posted @ 2014-02-27 11:21 clarenceV1 阅读(336) 评论(0) 推荐(0) 编辑

导航