I create a UploadContactsJobService that extend JobService after uploading finish I called stopCurrentJob method
private void stopCurrentJob() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
JOB_INFO = new JobInfo.Builder(JOB_ID,
new ComponentName(RDApp.get(), UploadContactsJobService.class))
.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)
.addTriggerContentUri(
new JobInfo.TriggerContentUri(CONTACTS_URI,
JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS))
.build();
scheduleJob(this);
}
jobFinished(mRunningParams, false);
}
the Service destroyed but the application process is still running and the app still running in the background i notice this on Android Studio it , should I kill app process to prevent battery drain using this
android.os.Process.killProcess(android.os.Process.myPid());