Detect day change event in broadcast receiver in android

Saurabh Gohil picture Saurabh Gohil · Dec 7, 2014 · Viewed 8.2k times · Source

I want to implement a feature in android app which execute a particular code when ever there is a date change(at 00:00AM) even when my app is not running.

Answer

gaurav jain picture gaurav jain · Jun 25, 2015

I might be late answering this question, but I personally faced the same problem. For day change, you can simply use a broadcast receiver with action "android.intent.action.DATE_CHANGED", and it will trigger whenever the date is changed (either implicitly or explicitly by user). I hope this will help someone who gets to here through Google.