Android日期更改的广播接收器 [英] Android Date Changed Broadcast Receiver

查看:695
本文介绍了Android日期更改的广播接收器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个广播接收器,当用户手动更改Date时会接收事件.但是我找不到他上次更改的日期.示例-如果日期是2014年6月5日,他将日期更改为2014年6月1日.我想知道2014年6月5日以前的日期.请帮助

I have a broadcast receiver that receives event when user manually changes Date . But I am unable to find what was the previous date he changed. Example- If date was 5-June-2014 and he changed it to 01-June-2014. I want to know the previous date that is 5-june-2014. Please help

推荐答案

您可以注册ACTION_TIME_TICK并每分钟记录当前日期.

You could register ACTION_TIME_TICK and record the current date every minute.

这篇关于Android日期更改的广播接收器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆