Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reinstate location provider with yayaa/LocationManager #77

Merged
merged 3 commits into from
Jan 6, 2022
Merged

reinstate location provider with yayaa/LocationManager #77

merged 3 commits into from
Jan 6, 2022

Conversation

thrillfall
Copy link
Contributor

@thrillfall thrillfall commented Sep 3, 2021

This reinstates the location provider for the fdroid build with yayaa/LocationManager. Using this library location is retrieved via Google Play Services (or GmsCore) or the free api depending on what is there.

This is just a proof of concept. What do you think of it?

fixes #75

@v4lli v4lli requested review from Wheedman and jspricke September 3, 2021 20:34
@jspricke
Copy link
Collaborator

@thrillfall thanks a lot for sending the patch!
In general it looks fine but testing on my Android 10 without Google services the app does not show my location (but it access the location service and other apps show my location). Where did you test it?
Also, would it make sense to use this patch for the Play version as well? @Wheedman ?

@thrillfall
Copy link
Contributor Author

thrillfall commented Sep 18, 2021

@thrillfall thanks a lot for sending the patch!
In general it looks fine but testing on my Android 10 without Google services the app does not show my location (but it access the location service and other apps show my location). Where did you test it?

I tested on LineageOS 18.1 (Android 11) with microG and I remember I had to kill the app and open it again before my position was displayed.

Also, would it make sense to use this patch for the Play version as well? @Wheedman ?

Given we find a comparable solution for notifications there is no reason to differentiate between playstore and f-droid build

@younix
Copy link

younix commented Sep 19, 2021

I also tested this change with LineageOS 17.1 (Android 10) on Fairphone 3.
The location feature does not work with this diff. Other Apps don't have any
problem to access location information.

@thrillfall
Copy link
Contributor Author

I only tested this with microg. Before trying anything else i first wanted to know if this was an approach the maintainers would consider.

@jspricke
Copy link
Collaborator

@thrillfall the approach sounds good to me. If you could get it to work without microg, that would be awesome.

@thrillfall
Copy link
Contributor Author

i tested this without microG and it works.

But again: I had to close the app and open it again before my position was displayed.

@jspricke
Copy link
Collaborator

jspricke commented Nov 9, 2021

Which Android version did you try?

@thrillfall
Copy link
Contributor Author

thrillfall commented Nov 9, 2021

LineageOS 16 (Android 9)

i am traveling the world (with fake location provider) and the app nicely follows and moves the blue location marker accordingly

update: you have to enable "zoom after start" AND enable "Notification" in the settings then the app moves the map to the current position with location dot (after you reopened / or switch back to this app)
I don't know yet why this is and if it is necessary.

@jspricke
Copy link
Collaborator

jspricke commented Nov 9, 2021

It works for me with your updated instructions, thanks for investigating!
Do you have time to look into how to make it work directly from the first start?
Otherwise I would be ok with merging this as a first step :).

@thrillfall
Copy link
Contributor Author

thrillfall commented Nov 10, 2021

Give me a week to investigate this, ok?

@jspricke
Copy link
Collaborator

jspricke commented Nov 10, 2021 via email

@thrillfall
Copy link
Contributor Author

on clicking the "locate me" button below the map type selector the map will center on the last known location with a blue dot

@thrillfall
Copy link
Contributor Author

@jspricke this solves the location issue, right?

@jspricke
Copy link
Collaborator

jspricke commented Nov 24, 2021 via email

@thrillfall
Copy link
Contributor Author

@.*** this solves the location issue, right? I just tested it and I still had to enable push notification and restart the app to get it localized, so this needs more fixes to make it usable, or what do you mean?

Oh, i did not notice that pn is still needed. I'll have a look again

@thrillfall
Copy link
Contributor Author

thrillfall commented Nov 25, 2021

so i tried with fresh installs and notification is NOT enabled on devices with

  • google play services
  • gmscore
  • android aosp (no proprietary google code)

on all devices i click the locate-me button and then have to grant location permission and then my location is shown as a blue dot. Works for me 🤷

@thrillfall
Copy link
Contributor Author

Closed due to lack of interest. Happy holidays everyone

@thrillfall thrillfall closed this Dec 24, 2021
@jspricke
Copy link
Collaborator

there is sill interest just not high priority, reopening.
Happy holidays to you as well.

@jspricke jspricke reopened this Dec 24, 2021
@v4lli
Copy link
Member

v4lli commented Dec 25, 2021

Closed due to lack of interest. Happy holidays everyone

Hey @thrillfall, thanks for your contributions & perseverance regarding this issue; they are much appreciated! Please do not take our slowness as disinterest, everyone here is working on this project 100% in their spare time besides their day job, university and family. I'd look into this PR myself, however I do not own any Android-compatible devices. But I'm positive that we can get this merged before next year's storm season. :) Happy holidays!

@Wheedman Wheedman merged commit 81e798b into meteocool:main Jan 6, 2022
@v4lli
Copy link
Member

v4lli commented Jan 23, 2022

Thanks for this everyone! @thrillfall have you had a chance to try the latest f-droid release yet?

@thrillfall
Copy link
Contributor Author

Yes. Location works now.

But there won't be any notification for rain or anything in the fdroid release, right?

@jspricke
Copy link
Collaborator

@thrillfall correct, that's #76.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

F-Droid: mark location on map
6 participants