https://kotlinlang.org logo
#announcements
Title
# announcements
j

Joey

11/29/2019, 1:28 AM
Does multiplatform library have the access to run background tasks for android and iOS? Sample use case is to monitor their location even app is in the background. Thanks in advance!
b

Burkhard

11/29/2019, 7:18 AM
My guess is that this is something that isn’t part of kotlin mpp directly, but you should easily be able to implement this. Just create an
expect
function that takes a lambda. The android/ios impelementation can then execute this lambda in a background task. Also I’m not using mpp myself much so I’m not an expert, especially not on androidd/ios. You should ask in #multiplatform if you need more advice.
j

Joey

11/29/2019, 7:19 AM
Thanks!
Appreciate the help!
b

Burkhard

11/29/2019, 7:20 AM
No problem 😉
3 Views