-
Notifications
You must be signed in to change notification settings - Fork 80
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
Working with GPS location also #107
Comments
This would indeed be possible, but would require Red Moon to ask for permission to the orecise location of the user. In the mean time, I would recommend you install UnifiedNlp and an location backend (Just search F-Droid for "location backend" for all the options. This will not only make the current Red Moon able to find your position, but it will also greatly improve the time it takes your phone to find your location when you need it 😄. |
See also #102 |
Thanks raatmarien for your answer. I know UnifiedNlp and did not find reliable backends (my cell-towers are not in databases, and app to add them seem dead ; I'm living far from other WiFi than mine and don't want to register mine in such databases, and it's not only because I'm leaving in a boat that moves…). I consider WiFi beacon mass recording as an issue and don't want to encourage it by using such databases. I will continue to use my bare GPS location, with 30-60s location fix, acceptable in my usecases (it even do not eat up my small Data plan, french provider : Free 2€/month 50MO) Thanks smichel17 for what look like a technical solution for the next version. "Who can the most, also can the least", I hope that Android allows apps to get an approximate location from the precise one, or can't figure out why it's not the case :-) |
See #102 and #107 This will use the GPS_PROVIDER for location if the NETWORK_PROVIDER isn't available on a device. I hope this will fix the problems in these issues, but I can't be sure since I can't replicate it. I think it will fix it if their device says that NETWORK_PROVIDER isn't available, however if NETWORK_PROVIDER is available and it just doesn't give any location, this commit may not solve those problems. Solving the problems then could become quite complicated, since it is hard to know if the location provider just needs a few more moments, or will never find anything. Furthermore, just always using GPS isn't feasable since some devices don't have GPS and the devices that do, the GPS_PROVIDER will take a lot longer than the LOCATION_PROVIDER.
I put a debug build up at http://smichel.me/files/red-moon/app-debug.apk. @Siltaar Could you try it out and see if it works for you? You should be able to install it alongside the f-droid/play store version. |
-checklist moved to top comment- |
Oh, I was updating my f-droid list of application since 9 days, not seeing the update coming… So sorry for the delay. I tested it, it worked perfectly. (and by the way, the UI updates are great). (I even did update my redshift config file with my exact location as I had it under the eye) |
@Siltaar I put my checklist in your top comment for easier reference. Although I didn't modify your words, I probably should have gotten your permission first. If you're not okay with it, I will put it back how it was. |
If we got a location read within the past hour, just use that instead of getting a new one.
@smichel17 You're welcome. |
@raatmarien @\anyone else: I'm trying to come up with a non-hideous solution to the following problem. I wrote it in mostly non-technical language so anybody can try to help me take a crack at it: The location service sends the UI certain messages. The ones we care about are:
After we register for location updates for the system, the system will notify us when location services get enabled or disabled. If location services are disabled at the time we register, we will get a notification (almost) immediately. When the user tries to update the location, one or two things happen:
So, the problem is, if we send a message once per update attempt (in I have this solution:
It works, but it's ugly. If possible, I'd really like to avoid relying on the current order of things in order to choose which commands to suppress (ie, a solution that won't cause bugs if someone changes the order of things later). But I can't think of anything that'll actually work. |
Found a good way: My solution was to send a message on registration when location services are enabled, as well as the one the system sends when they're disabled on registration, and suppress the first status update instead. |
Display location update progress with a series of snackbar messages Don't bother updating location if the most recent was within the hour Fix typo: TimeToggleReciever -> TimeToggleReceiver (swap i and e) Many small location-related bugfixes, and a little code cleanup
Fixed in 4790e80 |
There are a couple tweaks/improvements that could be made, but they are not worth spending any more time on right now. They're minor enough that I'd be impressed if any user could identify them. |
Not going to do this right now:
Hi,
I'm using current f-droid version of RedMoon, and even in Saving Mode or Approximate Position mode I can't get a location from RedMoon interface.
I'm using a Fairphone with the "Open Source" Android edition (meaning : graphical widget to root the phone, and no Google services).
So I don't have any working approximate location mechanism, but my GPS is working very well (with OSMand~ for instance).
Would it be possible to be able to get the current position for automatic Sunrise / Sunset time from precise position got from the GPS ?
The text was updated successfully, but these errors were encountered: