Check the service on several time gaps.
Now three... Hope this will be very useful for those who doing time intervals and web services. ServiceChecker.Java import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; public class ServiceChecker extends BroadcastReceiver { ShukranDbHelper dbHelper; @Override public void onReceive(Context context, Intent arg1) { // Just calling your method Log.d("hey", "I'm alive"); } } In AndroidManifest.xml <receiver android:name=".service.DataChecker"></receiver> In your Activity, Just call this. Intent alarmIntent = new Intent(this, ServiceChecker.class); pendingIntent = PendingIntent.getBroadcast(this, 0, alarmIntent, 0); startAlarm(); public void startAlarm() { manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE); int interval =600000; // 10 minute //10000 ...