patloew / colocation Goto Github PK
View Code? Open in Web Editor NEW๐บ Coroutines Location APIs Library for Android and Kotlin
License: Other
๐บ Coroutines Location APIs Library for Android and Kotlin
License: Other
is this library make a request to ACCESS_BACKGROUND_LOCATION?
This library is only available on jcenter, which is shutting down very soon
https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
For now, you can get it on Jitpack
https://jitpack.io/#patloew/CoLocation/v1.0.0
But that might not be ideal for you.
Please, make analog for RxLocation.settings().checkAndHandleResolution()
I do not able to make a flow of CoLocations methods because of onActivityResult callback
As mentioned in #4, move to using the Play Services coroutine library in a future release of CoLocation.
I was trying to use this inside CoroutineWorker, but it doesn't seem to return any result.
inside doWork() I am using this
Support creation CoLocation by DI with default LocationRequest in order to reduce boilerplate code in different parts of application if same settings are required
@patloew This is very useful library, thanks for this!
However, I'm wondering why you're not using Geocoder.isPresent()
method to check whether the geocoding is enabled on device or not? Won't it create any problem? Calling getFromLocation()
method directly?
Hi,
When trying to update play-services-location from 20.0.0 to 21.0.1 I face an issue with IncompatibleClassChangeError coming from CoLocation. I included the exact error message below. I managed to find an exact, although already solved, issue in Mapbox's issue tracker.
java.lang.IncompatibleClassChangeError:
Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected
(declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears in base.apk!classes35.dex)
at com.patloew.colocation.CoLocationImpl$getLocationUpdates$1.invokeSuspend(CoLocationImpl.kt:111)
as well as
java.lang.IncompatibleClassChangeError:
Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected
(declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears in base.apk!classes35.dex)
at com.patloew.colocation.CoLocationImpl.getLastLocation(CoLocationImpl.kt:68)
This issue happens independently from Android, Coroutines, or other dependencies versions. It's also reproducible 100% of the time.
Please let me know if I can assist with more information.
It will be a great thing to have Huawei Mobile Services location provider support.
I am getting this crash in my app. I have cancelled the job
used to get location updates in onStop()
and onDestroy()
of my activity.
Here are the traces,
Exception java.io.IOException:
at android.location.Geocoder$SynchronousGeocoder.getResults (Geocoder.java:388)
at android.location.Geocoder.getFromLocation (Geocoder.java:134)
at com.patloew.colocation.CoGeocoderImpl$getAddressListFromLocation$3.invokeSuspend
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java)
at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java)
at kotlinx.coroutines.internal.LimitedDispatcher.run (LimitedDispatcher.java)
at kotlinx.coroutines.scheduling.TaskImpl.run (TaskImpl.java)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java:82)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.java:82)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.java:82)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.java:82)
I'm not using ViewModel
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.