inaturalist / SeekReactNative

Seek v2, built with React Native for Android and iOS
https://www.inaturalist.org/pages/seek_app
MIT License
156 stars 26 forks source link

Use AOSP location when Google Play services are not installed #274

Open kasbah opened 4 years ago

kasbah commented 4 years ago

Hey, love this app, it's pretty much the reason I got a better phone :) I installed it on my new Android phone which doesn't have Google Play services (running GrapheneOS). It works great, except it can't get a location.

It comes down to react-native-geolocation-service using a Google Play API (FusedLocationProviderClient). I've also added a comment over there to see if it can be solved in the library itself https://github.com/Agontuk/react-native-geolocation-service/issues/203

Let's see what they say. Either way, it would be great if we can use this app, with locations added, without running proprietary Google software. Aside from people like me, who want to avoid Google's ad network spying, there are a lot of people in China who's phones come with Android without Google Play by default.

kueda commented 4 years ago

FWIW, in theory we could use the android.location or LocationManager APIs with some kind of custom native bridge library, but yeah, I think it would be preferable if those alternatives were supported in react-native-geolocation-service.

albullington commented 3 years ago

In Seek v2.12.4, we started using the new #android-rewrite branch of react-native-geolocation-service which was written to address this by falling back to android.location.LocationManager. As far as I know this is working, though all my testing devices have Google Play services installed.

I'm closing this for now, since I think the only to-do on our end is to update the geolocation library again once that branch is fully merged and released.

kasbah commented 3 years ago

Hurray, just in time for spring! Let me know when there is a release or pre-release and I can test it out on my Google free device.

albullington commented 3 years ago

You should be able to test it in the current Seek release and/or beta.

kasbah commented 3 years ago

Updated to version 2.12.4 (185) and it's not getting a location unfortunately. Checked location service is on and app has permissions. Not sure how to try out the beta.

![signal-2021-05-04-231431](https://user-images.githubusercontent.com/206854/117076590-8700a780-ad2e-11eb-8cf9-6b69f0a619bf.png)
albullington commented 3 years ago

Hi @kasbah, this link should allow you to join the beta. In the current beta (2.16.0), I tweaked our build.gradle file so it no longer lists play-services-location as a dependency, and I'm wondering if that will help resolve the issue.

kasbah commented 3 years ago

Thanks, that link seems to require a Google login though so I unfortunately I can't get the beta through that. If you have the APK or a link to download it I can install that.

(Most of the apps I install come from F-Droid. The way I normally install apps that are only offered through Google Play, like Seek is, is through the Aurora store using anonymous logins.)