Skip to content

Instantly share code, notes, and snippets.

@shriduttkothari
Created August 22, 2013 13:04
Show Gist options
  • Save shriduttkothari/6306844 to your computer and use it in GitHub Desktop.
Save shriduttkothari/6306844 to your computer and use it in GitHub Desktop.
Create a broadcast receiver with intent filter "android.intent.action.BOOT_COMPLETED" So that when device boots up we can start our UpdateCheckReceiver class, which can Schedule a repeating alarm to send the pending intent to this same broadcastReceiver class to instantiate a new AsyncTask, to perform polling on server, to check the update.
<receiver android:name="com.example.UpdateCheckReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
</intent-filter>
</receiver>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment