Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Action TIME_SET in android getting called many times without changing the time manually

Tags:

java

android

I have a receiver which listens to the TIME_SET action android.

but some times am getting intent action without changing the time (random issue)

please help me in solving this issue

Thanks in advance. code

    <receiver
        android:name=".tamperprooftime.TimeChangedReceiver"
        android:exported="false" >
        <intent-filter>
            <action android:name="android.intent.action.TIME_SET" />
            <action android:name="android.intent.action.TIMEZONE_CHANGED" />
        </intent-filter>
    </receiver>
like image 580
Syed Avatar asked May 22 '13 05:05

Syed


1 Answers

I also had this same issue. It appears that if your device has the "Use network provided time" checked the device will periodically update the time. It seems like if the time is updated even for the smallest of time corrections the TIME_SET broadcast will happen... I wish that there was some threshold parameter that could be checked/used so that these minor time corrections are broadcast, or that there was a different broadcast for when the user explicitly changed the time versus the device was correcting itself.

like image 79
TriGuy Avatar answered Oct 27 '22 15:10

TriGuy