the API doesnt support for threadings from androidx.work, we tried async{}, runBlocking{} but it doest help, the API runs async in the underlying thread
Cannot get latest location from fun getCurrentLocation(context: Context,onResult: (LocusResult) -> Unit)
class MyWorker(mContext: Context, workerParameters: WorkerParameters) :
Worker(mContext, workerParameters) {
override fun doWork(): Result {
Locus.getCurrentLocation(applicationContext) { result ->
result.location!!.let {
//none of values retrived
}
}
}
}
the API doesnt support for threadings from androidx.work, we tried async{}, runBlocking{} but it doest help, the API runs async in the underlying thread Cannot get latest location from fun getCurrentLocation(context: Context,onResult: (LocusResult) -> Unit)
Please help support API return in future/promises