I want to use a service that run in background indefinitely and call a method every 10 minute and its running even app killed
How to create it?
Assuming you have a Running Service
User AlarmManager to run Service every 10 minutes
AlarmManager am=(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
Intent i = new Intent(context, YourService.class);
PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);
am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), 600000, pi); // Millisec * Second * Minute
}