http://code.google.com/p/android/issues/detail?id=2880&can=4&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
Though you can use the AlarmManager to help you keep track of when 12am hits. On Nov 8, 1:32 pm, NewPa <shiji...@gmail.com> wrote: > Hi, > One of my application need to know a new day is coming, that is, > if the clock of phone changed from 23:59 to 00:00, my application will > do some logic. I tried to use android.intent.action.DATE_CHANGED, but > based on my test, this event only occured when i change the date > mannually, I could not get this action when clock changed from 23:59 > to 00:00. Does anybody know why? > > This is the defination in AndroidMainfest.xml > <receiver android:name=".DateBoradcastReceiver" > android:enabled="true"> > <intent-filter> > <action android:name="android.intent.action.TIME_SET"/ > > <action > android:name="android.intent.action.DATE_CHANGED"/> > </intent-filter> > > Below is the code in DateBoradcastReceiver class: > public void onReceive(Context arg0, Intent arg1) { > Log.d("PregnancyWidget", "intent= " > + arg1); > String action = arg1.getAction(); > if (action.equals(Intent.ACTION_DATE_CHANGED)||action.equals > (Intent.ACTION_TIME_CHANGED)) { > //business logic is here > } > } > > Thanks in advance for your help. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en