Reputation: 117
Hy everybody,
I try now to create a Background-Service to update data on my app from api server daily between 1:00 and 1:59 with Kotlin android, but realy I haven't any idea how to do this, and which tool should i use for it?
If anyone know how to do this?, that would be very cool.
Upvotes: 0
Views: 363
Reputation: 1521
Well for background tasks you should study Job Scheduler in Android. You can set constraint like if Network available, timings and other.
Read about Job scheduler from this android doc: https://developer.android.com/reference/android/app/job/JobScheduler
You can also see a codelab here:
Upvotes: 1