Khalil Khalil
Khalil Khalil

Reputation: 117

How to do update data from API server in Android Kotlin daily between 1:00 and 1:59 Clock?

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

Answers (1)

Hamza Khan
Hamza Khan

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:

https://codelabs.developers.google.com/codelabs/android-training-job-scheduler/index.html?index=..%2F..android-training#0

Upvotes: 1

Related Questions