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

Automatic turning, based on location #5

Closed
danialbehzadi opened this issue Mar 20, 2016 · 20 comments
Closed

Automatic turning, based on location #5

danialbehzadi opened this issue Mar 20, 2016 · 20 comments

Comments

@danialbehzadi
Copy link
Contributor

danialbehzadi commented Mar 20, 2016

It would be great if the app could turn itself on in a duration after sunset of the users location and turn off in a duration before sunrise.

@raatmarien
Copy link
Member

Good idea, this would be very convenient for the users.

I'll add it to the planned feature list and will probably look into it sometime in the future. However, if anyone else likes to implement it, pull requests are welcome.

raatmarien added a commit that referenced this issue Mar 20, 2016
@tastytea
Copy link

It would be even greater if the app could dim the screen gradually based on location, like redshift does.

@raatmarien
Copy link
Member

It would be even greater if the app could dim the screen gradually based on location, like redshift does.

Do you mean that the filter should change gradually when transitioning from day to night?

@tastytea
Copy link

Yes, that way the eyes can slowly adapt.
From the manpage of redshift:

During twilight and early morning, the color temperature transitions smoothly from night to daytime temperature to allow your eyes to slowly adapt over a period of about an hour.

It would be great if red moon behaves in a similar way.

@raatmarien
Copy link
Member

Yeah, that's a good idea. I will keep that in mind.

@twckr
Copy link
Contributor

twckr commented Mar 20, 2016

I would favour the gradually dimming as proposed by @tastytea.
Maybe this repository would be helpful: https://github.com/mikereedell/sunrisesunsetlib-java

@raatmarien
Copy link
Member

I would favour the gradually dimming as proposed by @tastytea.

I agree, gradually dimming would be better.

Maybe this repository would be helpful: https://github.com/mikereedell/sunrisesunsetlib-java

That library looks great, nice find.

@raatmarien raatmarien added the good first issue These issues are relatively simple and self-contained. label Mar 20, 2016
raatmarien added a commit that referenced this issue Mar 28, 2016
See #5

See #17

The user now has the option to automatically turn the filter on and
off. If they select the option, they can choose at what times the filter
is turned on and off. Later the user may have the choice to not select
the turn on and off times manually, but to automatically turn on and of
at sunrise and sunset.
@techwebpd
Copy link
Contributor

like twilight app, it would be great

@danialbehzadi
Copy link
Contributor Author

Many users turn off automatic location service for security/privacy reasons. It would be nice if there were an option to select the location manually.

@raatmarien
Copy link
Member

Many users turn off automatic location service for security/privacy reasons. It would be nice if there were an option to select the location manually.

I agree, however I'm not sure of an effective way to prompt the user for their location. Would letting them simply enter their coordinates suffice?

@danialbehzadi
Copy link
Contributor Author

Letting users enter their coordinates does it, but I think there should be a library to automatically translate city names to coordinates somewhere. I'm really not familiar to android development, but I'm sure there are such libraries in many other languages. When users try to enter their city name, it would search the city name in database and suggests possible results while typing, and user selects the right city.

@Albirew
Copy link

Albirew commented Apr 2, 2016

You can let user choose between location or date and time based guess (less precise but privacy friendly)

@twckr
Copy link
Contributor

twckr commented Apr 2, 2016

To get coordinates for a city / region / address you could use:

http://nominatim.openstreetmap.org/search/<querystring>?format=json

@smichel17 smichel17 mentioned this issue Apr 2, 2016
20 tasks
@raatmarien
Copy link
Member

You can let user choose between location or date and time based guess (less precise but privacy friendly)

I don't think this will be precise enough to make a meaningful guess, since the timezone only tells me anything about the longitude, which doesn't correlate with the local sunrise and sunset times.

To get coordinates for a city / region / address you could use:

http://nominatim.openstreetmap.org/search/<querystring>?format=json

Thanks for the link, that would be a possibility. However I'm cautious on introducing more permissions, like internet access, to Red Moon unless it is absolutely necessary.

@smichel17
Copy link
Member

OsmAnd does this by downloading some wikipedia data. They do it in their own download manager, which requires internet permission, but this app could just include a link to where you can download that information, then import the data from a file.

@danialbehzadi
Copy link
Contributor Author

another workaround to prevent Internet access is to let users select their location by touch on a world map image, which returns the coordinats.

On ۴ آوریل ۲۰۱۶ ۹:۲۲:۳۲ (GMT+04:30), smichel17 notifications@github.com wrote:

OsmAnd does this by downloading
some wikipedia data. They do it in their own download manager, which
requires internet permission, but this app could just include a link to
where you can download that information, then import the data from a
file.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#5 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@raatmarien
Copy link
Member

another workaround to prevent Internet access is to let users select their location by touch on a world map image, which returns the coordinats.

Yes, I agree that may be a good solution, since the location doesn't need to be very precise at all.

@smichel17
Copy link
Member

smichel17 commented Apr 4, 2016

another workaround to prevent Internet access is to let users select their location by touch on a world map image, which returns the coordinates

This is how Twilight does it. For me, it's actually annoying -- I always wish I could just select more precisely with the tap. However, it would be a great interface if there were a way to zoom in a little bit.

@smichel17 smichel17 added needs design and removed good first issue These issues are relatively simple and self-contained. labels Mar 4, 2017
@smichel17
Copy link
Member

Okay, here's a maybe controversial question: is it important that to be able to manually set your location?
Here's my logic; let me know if there's a hole or if you disagree with the principle.

Principle: The main advantage of automatically setting the timer based on location is that it requires almost no thought/effort put into configuration.

Therefore, if it takes more effort to manually set your location than it would to manually set the timer, there is no point of the feature and we should not offer it.

It doesn't take that much effort to manually set the timer. I know when I wake up each day, and I know approximately what time the sun goes down. Certainly less effort than downloading a bunch of location data from wikipedia. Probably less effort than manually entering your location (who knows their lattitude and longitude off hand?). Depending on the interface, it might even be easier than setting your location on a map -- Twilight's map was imprecise enough that I had to try several times before I got an accurate enough location.

By that reasoning, we shouldn't offer the ability to manually set your location, even if it was trivial to develop (I'm not really sure how hard it would be).


There is one thing left out from the argument above: It also takes effort to keep the timer in sync with the sun as the days get shorter and longer*. Is there a way to get this without inputting your location?

I'm not sure. There might be. Is it possible to get a location based on the time of year and the sunrise/sunset times? If so, we could allow setting the default location based on the user-set times, and then Red Moon can update the timer based on that location. If that works, it seems like the easiest way, both from a user's point of view and effort to develop.

*Red Moon currently only updates the timer when it gets an update of the location, so if you never turn on location services, it won't actually keep the timer fully in sync with the sun. But we're talking about whether a feature is worth implementing, so what matters is whether it could, not whether it does.

@smichel17 smichel17 added android Requires android-specific knowledge. Generally also implies 'hard'. and removed enhancement labels Mar 4, 2017
@smichel17 smichel17 added this to the later milestone Apr 26, 2017
@smichel17 smichel17 changed the title Automatic turning, based on location Manually set location (was: Automatic turning, based on location) Jun 16, 2017
@smichel17 smichel17 changed the title Manually set location (was: Automatic turning, based on location) Automatic turning, based on location Oct 21, 2017
@smichel17 smichel17 removed feedback wanted android Requires android-specific knowledge. Generally also implies 'hard'. labels Oct 21, 2017
@smichel17
Copy link
Member

This was originally a larger issue, which makes reading through it fairly unfocused. So, I'm closing it and created #206 to track the remaining part (manual location).

@smichel17 smichel17 removed this from the planned milestone Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

7 participants