GithubHelp home page GithubHelp logo

libreshift / red-moon Goto Github PK

View Code? Open in Web Editor NEW
638.0 638.0 80.0 6.42 MB

Android screen filter app for night time phone use.

License: GNU General Public License v3.0

Kotlin 100.00%
android android-application fdroid gpl gplv3 kotlin night night-mode phone red-moon

red-moon's People

Contributors

70h avatar aboshanab avatar adamniederer avatar ahangarha avatar cngu avatar comradekingu avatar danialbehzadi avatar emintufan avatar espadav8 avatar jawnnypoo avatar kimjio avatar kjy00302 avatar leocadio94 avatar matiasvelizb avatar micoarcher avatar mueller-ma avatar naofum avatar nhman-python avatar raatmarien avatar santossi avatar smichel17 avatar sr093906 avatar swyter avatar techwebpd avatar thanass avatar therhokar avatar twckr avatar verdulo avatar weblate avatar zoraver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

red-moon's Issues

Automatic turn-on/turn off does not work

Hi there !

I happily discovered Red Moon as an alternative to Twilight on F-Droid.

However, automatic turn-on/turn at custom times does not seem to work : I set it to run between 20:00 and 06:00, but it did not stop at 06:00.

Also, I'm not quite sure what the two startup options do ("Keep running after reboot" and "Alway open on startup") : do they mean that Red Moon doesn't normally start at boot to monitor automatic turn on/off times, and that reboot behaves differently than normal boot ?

Root mode

Filters along the lines of what this app currently does may work without root, but on rooted devices, true temperature adjustment along the lines of what's done by cf.lumen or CyanogenMod LiveDisplay is a far better solution, and it would be nice to see such functionality available in a standalone F-Droid app.

How to translate to lithuanian language

great app, how to translate it to lithuanian lang, can i create values-lt folder and put in it strings file. Where are the english strings file to use it as a template?

Improve notification

  • Add Resume/Pause labels near Resume/Pause buttons (especially because on Android N only labels are shown, see here)
  • Rewrite "Paused" and "Running. Pause to install apks" strings for avoid something of redundant and obvious with the corresponding label below

Dark theme

Consider having a dark theme so that eyes aren't dazzle when turning red-moon on at night. Also, dark themes are just nicer (!)

Contributing Translations

I am able to contribute translations to Chinese, which would widen the user-base, but I am not sure how this could be done. Do you have any suggestions?

Red Moon doesn't work on Xperia Z3c

I tried to run Red Moon on my device but nothing happens when i enable the filter, even at night.

Is there anything i can do to help you solve this issue?

Sony Xperia Z3c
Android 5.1

Add a scheduler

It would be great if redmoon could be (de)activated automatically at certain hours.

Scheduling doesn't work on the last day of the week

Roll of the DAY_OF_MONTH doesn't roll the MONTH forward as I expected. So when it tries to schedule for the next day on the last day of the month it instead schedules for the first day of the previous month. It immediately receives this alarm and schedules a new one, essentially continuously turning the filter on (or off).

For any users affected, the problems stop when you select "Never" as times to schedule the filter.

Relevant code: https://github.com/raatmarien/red-moon/blob/master/app/src/main/java/com/jmstudios/redmoon/receiver/AutomaticFilterChangeReceiver.java#L128

Crash on startup

Red Moon 2.1 from F-Droid on Android 4.2.2 crashes straight away, the GUI doesn't even appear.

Using a Fairphone 1.

Preview filter when adjusting sliders

  • Filter turns on while sliders are being adjusted

When the filter is active, you can see immediately what happens as you adjust the sliders. When the app is off, you need to turn it on to see; real time feedback on what the filter is going to look like would be really useful.

Cannot start the application "Red Moon has stopped"

Hi,

when I try to launch the application I got the message " Unfortunately, Red Moon has stopped".
My phone is Motorola moto g 4G with android 4.4.4 (XT1039).

Using USB Debugging, here the log:
E/VdcInflateDelegate(14075): Exception while inflating
E/VdcInflateDelegate(14075): org.xmlpull.v1.XmlPullParserException: Binary XML file line #17 tag requires viewportWidth > 0
E/VdcInflateDelegate(14075): at android.support.graphics.drawable.VectorDrawableCompat.updateStateFromTypedArray(VectorDrawableCompat.java:535)
E/VdcInflateDelegate(14075): at android.support.graphics.drawable.VectorDrawableCompat.inflate(VectorDrawableCompat.java:472)
E/VdcInflateDelegate(14075): at android.support.graphics.drawable.VectorDrawableCompat.createFromXmlInner(VectorDrawableCompat.java:436)
E/VdcInflateDelegate(14075): at android.support.v7.widget.AppCompatDrawableManager$VdcInflateDelegate.createFromXmlInner(AppCompatDrawableManager.java:829)
E/VdcInflateDelegate(14075): at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:303)
E/VdcInflateDelegate(14075): at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:178)
E/VdcInflateDelegate(14075): at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:173)
E/VdcInflateDelegate(14075): at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:60)
E/VdcInflateDelegate(14075): at android.support.v7.widget.Toolbar.(Toolbar.java:254)
E/VdcInflateDelegate(14075): at android.support.v7.widget.Toolbar.(Toolbar.java:196)
E/VdcInflateDelegate(14075): at java.lang.reflect.Constructor.constructNative(Native Method)
E/VdcInflateDelegate(14075): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
E/VdcInflateDelegate(14075): at android.view.LayoutInflater.createView(LayoutInflater.java:594)
E/VdcInflateDelegate(14075): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
E/VdcInflateDelegate(14075): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
E/VdcInflateDelegate(14075): at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
E/VdcInflateDelegate(14075): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
E/VdcInflateDelegate(14075): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
E/VdcInflateDelegate(14075): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
E/VdcInflateDelegate(14075): at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:379)
E/VdcInflateDelegate(14075): at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:300)
E/VdcInflateDelegate(14075): at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:264)
E/VdcInflateDelegate(14075): at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129)
E/VdcInflateDelegate(14075): at com.jmstudios.redmoon.activity.ShadesActivity.onCreate(ShadesActivity.java:35)
E/VdcInflateDelegate(14075): at android.app.Activity.performCreate(Activity.java:5248)
E/VdcInflateDelegate(14075): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
E/VdcInflateDelegate(14075): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
E/VdcInflateDelegate(14075): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
E/VdcInflateDelegate(14075): at android.app.ActivityThread.access$800(ActivityThread.java:139)
E/VdcInflateDelegate(14075): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
E/VdcInflateDelegate(14075): at android.os.Handler.dispatchMessage(Handler.java:102)
E/VdcInflateDelegate(14075): at android.os.Looper.loop(Looper.java:136)
E/VdcInflateDelegate(14075): at android.app.ActivityThread.main(ActivityThread.java:5086)
E/VdcInflateDelegate(14075): at java.lang.reflect.Method.invokeNative(Native Method)
E/VdcInflateDelegate(14075): at java.lang.reflect.Method.invoke(Method.java:515)
E/VdcInflateDelegate(14075): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/VdcInflateDelegate(14075): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/VdcInflateDelegate(14075): at dalvik.system.NativeStart.main(Native Method)
D/AndroidRuntime(14075): Shutting down VM
W/dalvikvm(14075): threadid=1: thread exiting with uncaught exception (group=0x416b1d40)
E/AndroidRuntime(14075): FATAL EXCEPTION: main
E/AndroidRuntime(14075): Process: com.jmstudios.redmoon, PID: 14075
E/AndroidRuntime(14075): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jmstudios.redmoon/com.jmstudios.redmoon.activity.ShadesActivity}: android.view.InflateException: Binary XML file line #36: Error inflating class android.support.v7.widget.Toolbar
E/AndroidRuntime(14075): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198)
E/AndroidRuntime(14075): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
E/AndroidRuntime(14075): at android.app.ActivityThread.access$800(ActivityThread.java:139)
E/AndroidRuntime(14075): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
E/AndroidRuntime(14075): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(14075): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(14075): at android.app.ActivityThread.main(ActivityThread.java:5086)
E/AndroidRuntime(14075): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(14075): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(14075): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime(14075): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime(14075): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(14075): Caused by: android.view.InflateException: Binary XML file line #36: Error inflating class android.support.v7.widget.Toolbar
E/AndroidRuntime(14075): at android.view.LayoutInflater.createView(LayoutInflater.java:620)
E/AndroidRuntime(14075): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
E/AndroidRuntime(14075): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
E/AndroidRuntime(14075): at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
E/AndroidRuntime(14075): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
E/AndroidRuntime(14075): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
E/AndroidRuntime(14075): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
E/AndroidRuntime(14075): at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:379)
E/AndroidRuntime(14075): at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:300)
E/AndroidRuntime(14075): at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:264)
E/AndroidRuntime(14075): at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129)
E/AndroidRuntime(14075): at com.jmstudios.redmoon.activity.ShadesActivity.onCreate(ShadesActivity.java:35)
E/AndroidRuntime(14075): at android.app.Activity.performCreate(Activity.java:5248)
E/AndroidRuntime(14075): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
E/AndroidRuntime(14075): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
E/AndroidRuntime(14075): ... 11 more
E/AndroidRuntime(14075): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime(14075): at java.lang.reflect.Constructor.constructNative(Native Method)
E/AndroidRuntime(14075): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
E/AndroidRuntime(14075): at android.view.LayoutInflater.createView(LayoutInflater.java:594)
E/AndroidRuntime(14075): ... 25 more
E/AndroidRuntime(14075): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-v19/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020016
E/AndroidRuntime(14075): at android.content.res.Resources.loadDrawable(Resources.java:2099)
E/AndroidRuntime(14075): at android.content.res.Resources.getDrawable(Resources.java:700)
E/AndroidRuntime(14075): at android.support.v7.widget.TintResources.superGetDrawable(TintResources.java:48)
E/AndroidRuntime(14075): at android.support.v7.widget.AppCompatDrawableManager.onDrawableLoadedFromResources(AppCompatDrawableManager.java:374)
E/AndroidRuntime(14075): at android.support.v7.widget.TintResources.getDrawable(TintResources.java:44)
E/AndroidRuntime(14075): at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:323)
E/AndroidRuntime(14075): at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:180)
E/AndroidRuntime(14075): at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:173)
E/AndroidRuntime(14075): at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:60)
E/AndroidRuntime(14075): at android.support.v7.widget.Toolbar.(Toolbar.java:254)
E/AndroidRuntime(14075): at android.support.v7.widget.Toolbar.(Toolbar.java:196)
E/AndroidRuntime(14075): ... 28 more
E/AndroidRuntime(14075): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector
E/AndroidRuntime(14075): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:933)
E/AndroidRuntime(14075): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)
E/AndroidRuntime(14075): at android.content.res.Resources.loadDrawable(Resources.java:2095)
E/AndroidRuntime(14075): ... 38 more
W/ActivityManager( 1023): Force finishing activity com.jmstudios.redmoon/.activity.ShadesActivity

Version 2.2 still crashes on CM 13 (Marshmallow)

Hi there !

I saw that you said that the bug had been fixed in the other tickets but I've just upgraded to 2.2 and nothing has changed : It crashes when trying to enable Redmoon.

Your app looks promising I hope I will be able to try it soon :)

Can't add the widget on the desk

Using Android 5.1 from Fairphone 2 and last f-droid available RedMoon : 2.6.2

If I grab the RedMoon widget to slide it on a desk panel, the widget is dropped on the panel, but never appears on it. I tried several times…

Automatic adjustment based on environment

This is a great app, thanks a ton! I've been dreaming about this kind of app for a long time. πŸ‘

I'd like to make a feature proposal: the screen filter would adjust automatically based on the brightness of the environment. I have automatic brightness adjustment in Cyanogenmod but it is not sufficient, I'd like to have this screen filtering to adjust automatically too, in a similar way.

However, I'm not sure how to make it easily configurable. Perhaps it would only be the intensity level that needs to change as a function of environment brightness. The user could have one or few parameters to tune that or, as in my screen brightness config, the user could create "setpoints", that is, define light sensor values in lux and the corresponding intensity levels.

move to GPL

I was wondering how you'd feel about moving to GPLv3+.

I love that there's now a usable free software replacement to proprietary screen filter apps, and I'd like to work to make it better than those -- but I'd also be sad if a proprietary fork with added features came along and this app died out because they didn't give back.

To be 100% clear, that is NOT a threat. I have already done 85% of a UX overhaul for this app, which I will post in a mega-issue soon, no matter which license you decide to go with. the spirit of FLO development is collaboration; I do not want this to become a divisive, mud-slinging argument. I do have a preference and I hope you will consider switching. :)

Blink after changing automatic setting

Hi,
I have a problem when I change the automatic setting : Red Moon turn completely crazy (on, off, on, off,...)

My config :
Cyanogemod 11
Red Moon 2.6.1

Red Moon config :
Lower brightness checked
Automatically turn on filter on custom times (on:22h, off:6h)
Keep running after reboot : unchecked
Always open on startup : checked

Step to do that:
Red Moon is on and it's actually after "on time" (22h in my case)
Go into settings and change "custom times" into sun to enter disco mode.

I have another question :
What is the difference between "Keep running after reboot" and "Always open on startup"

Thanks a lot for this great application !

Pausing doesn't work

Pausing the filter doesn't work with version 2.2.1. It only stopps the the filter and hides the notifcation (so I must go in the app again and start it there).

UX changes

List of changes to consider this ticket closed:

  • Bump to v2.7.0 πŸ˜ƒ
  • Snack bar when top switch is disabled
    • More contrast with dark theme.
  • Remove all drop-down actions in notification except pause/resume.
    • Tapping the text will still open the app.
    • Alternative: replace the 'close' button with "pause for X minutes"
      • There's probably a good way to show this with an icon; I'm not sure what that should look like.
      • When the filter is temporarily paused, the notification text should read "Paused for [X] minutes"
      • If there are 15 or fewer seconds left, "Paused for [X] seconds."
      • Hitting "Pause for X minutes" while the filter is paused will reset the pause time to X minutes.
  • Add FAB that toggles pause/resume.
    • The FAB should not be visible when the app bar switch is off
    • Animate the FAB appearing and disappearing like this.
  • APP BAR SWITCH
    • When it's off, all settings except "Dark theme", "Visit the project page", and "Email me..." are grayed out and inaccessible.
      • The ADD button should also gray out to reflect that it is not clickable.
      • The three moons should all gray out.
    • When it's off, the notification should not appear.
    • Pausing or resuming the filter via notification or FAB does not change the position.
    • When switched on, the filter should start paused.
      • For this release; the end goal is more nuanced behavior; see #34.
  • Add "Location" setting below "turn off time"
    • Grayed out unless "Toggle filter automatically" is set to "sun"
    • Secondary text reads "Lat: ##.## Long: ##.##"
      • If location has never been set, Secondary text reads "Not set"
    • Tapping the setting attempts to update the location.
      • Updates toggle times if location update is successful.
      • If it fails, it shows an error message "Enable location services to update location"
        (Replace the current message starting with "location service isn't enabled...")
  • In "sun" mode, secondary text for "Turn filter off" and "Turn filter on" shows in-use (not custom) times.
    • The custom times should still be saved & restored if the user returns to using the custom times.
  • Setting "Toggle filter automatically" to "sun" immediately sets toggle times to a reasonable default
    • One suggestion in #5 is approximating sunset/sunrise times based on time zone.
    • In "sun" mode, each time the filter is automatically toggled, Red Moon attempts to update location.
      • This attempt fails or succeeds silently.
      • If it succeeds, updates toggle times, too.
      • No change if it fails.
  • Remove "Keep running after reboot" setting
    • The service, if enabled, should always stay running after reboot.
  • Remove "Contact" header (move these settings under "Other")

The rest of this comment is out of date. It may still be useful for context.


Some of this (anything quoted) is pulling from the Material guidelines (settings and selection controls). The rest is from my experience as a UX designer (in training).


1. Clarify the how users interact with the app

Add a FAB & change notification, the top-level switch, startup settings, & the automatic filter backend.

I wrote out a bunch of reasons why the current behavior is confusing, but they're cluttering this section so I moved them down to the bottom of this post 0 so here we can focus on solutions.

The user doesn't distinguish between the service and the filter. They only care about 3 questions:

  • Am I interested in using Red Moon? Probably yes, but this setting should exist so the app can easily be completely disabled without uninstalling it. It's changed so infrequently that it doesn't need to exist outside the app.
    • Do I want Red Moon running right now? Ie, they want to be able to manually stop the service.
      • What parameters should it run under? Both filter parameters and timing. The user configures these (in a profile) and then forgets about it. Maybe occasionally they'll switch profiles. If they're constantly tweaking profile settings, we're doing something wrong or there's a feature we're lacking.

So here's a state hierarchy:

  1. Red Moon disabled
  2. Red Moon enabled
    1. Filter paused
    2. Filter on
      1. Profile a
      2. Profile b
      3. etc

Each indentation level is a layer of abstraction, and we have controls at each layer. If you mix layers, you'll end up with settings in places that don't make sense1.

The user doesn't care if Red Moon is able to turn off the service in the background, nor if the service starts on boot or if service is able to restart across reboots -- they only care what state the app is in. So the question becomes, where do we control elements of each state, and which states should persist across reboot? Here are my conclusions:

Remove both 'Startup' settings. They both have to do with implementation details that users don't care about.

  • If a user wants a filter that they have to manually enable and disable that's on after every reboot, they'll already be using a profile where the filter is always on and just pause it manually.

The top-level switch should enable/disable Red Moon. Its state should persist across reboot.

  • The only way to toggle this setting is tapping the slider in the app.
    • control via intent can happen at a higher level
    • Remove the 'close' button from the notification. It would be too easy for a user to disable Red Moon when they intended to turn off the filter. If you want to keep this button, repurpose it. See the 2nd comment in this thread.

Add a FAB that pauses and resumes the filter. Its state should not persist across reboot.

  • If Red Moon is disabled, the FAB will enable it as well as resuming the filter.
  • The 'pause' button in the drop-down notification will have identical behavior, except it'll never be shown while Red Moon is disabled.
  • If you use this button while Red Moon is disabled (state 1), it will enable red moon and turn the filter on.

Changes to the filter settings get their own section at the bottom.


2. Change "Dark theme" to a switch and remove the secondary text.

Secondary text is optional. If the label is sufficient on its own, don't add a secondary text description.
[...]
If you have a single option, avoid using a checkbox and use an on/off switch instead.

"Dark theme" is pretty universally understood.

Switches are pretty overrated; they're often more confusing than a checkbox would be. That said, they have their place on lone settings or when changing the setting has an immediate effect (like toggling wifi or switching theme). Dark theme is both.


3. Shuffle around settings under the 'automatic filter' header

For non-switch settings, secondary text should show the current status of a setting only.

The first 3 lines mimic Twilight's interface. 'Location' should be smaller than Twilight's and only show the coordinates in its secondary text.

Automatic filter Filter times

  • {Always | Sun | Custom}
    [slider bar for viewing current times or setting them if 'custom' is selected]
  • Location
    [coordinates]

'Location' opens up a new activity that guides you through the process of picking your location. That screen has 4 options:

  • Automatic (accurate)
    Requires location services
  • Automatic (approximate)
    Estimate location from system date/time
  • Enter coordinates
  • Search by city

0: It should be possible to understand how all settings will affect behavior without actually testing out different combinations of settings. It boils down to whether there a difference between a filter that's on but paused and a disabled filter. Ie, can the service be running and the filter be disabled? Related questions that follow:

  • Does the notification showing mean the service is running or that the filter is on?
  • If I have I have automatic filter times set but I pause the filter, will the filter turn on at sunset or be paused indefinitely?
  • Does the top level switch start and stop the filter or the service?
  • Does the 'automatic filter' setting start and stop the filter or the service?
  • Does the stop button in the notification stop the service or filter?

My best guesses for the answers are:

  • The notification tells whether the service is running or not, as does the switch.
  • The filter turns on when the service starts, but can be paused through the notification.
  • Automatic filter toggles the service on and off.

Could you explain what the actual relationship between filter and service is? If it's different enough from my guess that implementing my suggestions would be difficult, I'll make some modifications.

1: It's pretty clear that the team behind Twilight did their homework for the design, but they got lost in the details. They decided "always on" should be at the manual-intervention level; I think it's a profile setting. They also decided "filter times" should be a global setting, when I think it's also a profile setting. Changing it is larger-scope than this ticket, though. I am only including changes here that I think should be uncontroversial.

Use "pause/resume" language in "automatic toggle" settings.

Automatic filter toggle uses language, "Turn filter off" and "Turn filter on". The notification uses language "pause/resume". However, they both toggle the same setting (whether the filter is shown or not). This is the intended functionality, but they should use the same language.

I keep changing my opinion on which I prefer: I like "pause/resume" because it's very clear that this is a distinct action from enable/disable. I like "on/off" because it is actually describing the filter state. It does not matter that much which you pick, but they need to be the same. So either:

In light of #34, I think pause/resume is the clearest phrasing.

  • Remove all references to "Turning the filter on/off". These become "Pausing/resuming the filter".
    • "Turn on time" => "Resume at"
    • "Turn off time" => "Pause at"
    • "Toggle filter automatically"=>"Toggle mode" {Manual only|Automatic (sun)|Automatic (custom)}
      • The important change is {Never -> Manual only}, for clarity; the other changes only exist to make that one work. Feel free to change their phrasing if you think of something better.

Crashes when turned on on CM13

On android 6.0.1 (cm13) ui shows ok, when i push enable button error appears: app stopped working. Then notification tray is trying to load smthng and the same error is shown again.

Support Android N's quick tile API

I'm having difficulties writing this feature proposal because I don't know the terms.. Currently, redmoon appears in the notification panel. At least on my Cyanogenmod, there's another similar panel which shows square icons for wifi, brightness, settings, volume, location etc. Could redmoon be moved there instead (what's the name of that panel???)? One nice square icon among the others. Then, one press to enable/disable (pause/unpause) and a long press to open the app itself. Then it wouldn't need to appear in the notification panel anymore either.

Does this make sense?

Automatically pause filter in some apps (APK Installer)

Originally discussed in #61.

  • Automatically pause when installing APKs
    Darker detects when an APK is attempting to install and temporarily pauses.

This would indeed be very useful, and I've been looking into how to accomplish this. It seems that up to Android Lollipop (API 21) it was fairly easy to get the info of the foreground app with ActivityManager.getRunningTasks, however as of API 21+ this only returns 'non sensitive' tasks, making it unusable for this purpose.

According to this StackOverflow answer a workaround on later versions of Android is using android UsageStatsManager and filter out the last used application. A problem with this approach is that UsageStatsManager isn't implemented on Samsung phones according to the comments on that question.

Lastly I'm not sure how Red Moon would register changes to the foreground activity. There doesn't seem to be a listener framework for the UsageStats or the ActivityManager and constantly polling for changes may be a drain on the battery life of a phone.

That said, I'm quite a fan of this feature. I think it would be a huge usability improvement (especially for F-Droid users). However it seems that it would be quite complex and time consuming to implement this correctly, which I don't have right now. If someone else is willing to implement this, I would love to see a pull request πŸ˜„.

Progressively red-en and dim backlight according to sunset

Once in auto-turn-on mode, using sunrise and sunset times, what Twilight (or Redshift) still does better is to adapt their relaxing-parameters to the expected ambient luminosity, regarding sun light intensity (assumed to reach the user through its windows).

Sun is rising/setting fast or slow relatively to the user position on the globe, and the user's eyes are adapting this light quite slowly also.

Despite the matching-sunlight goal, I personally like the progressive start of other solutions because my sight adapts to the red and I feel that the image on the screen is less red-distorded if I'm slowly boiled to it (like a frog in a slowy heated water-filled pan).

Bright flash when lowering brightness

Checklist added by @smichel17. Original comment (not modified) is below.

  • Gradually lower brightness as the filter fades in, instead of all at once

When I have the option "Lower Brightness" enabled and turn on red moon, the screen flashes bright as it restores the brightness to max before lowering it.
Sony Xperia Z5

Lower brightness per filter

lower brightness looks like it is part of the settings for a filter, but is actually independent of the selected filter.

Options to fix are

  • making it per-filter
    • Argument for this: there is a filter I use (for viewing color-sensitive media in a room with lights off) which does not change the red levels but does darken the screen; I use it exclusively after I've turned my phone's hardware brightness to minimum.
  • moving the setting
    • Argument for this: it's how filters work right now; the other reduces flexibility of the default config.

I think we should go with the first option. The default filter should not have lower brightness enabled. The bed reading filter should. If the user changes this setting, the current filter is updated instead of displaying custom like if you changed any of the other filter settings.

Provide feedback on the acquired location

Hi,

I would like to use the Sun times to enable and disable RedMoon. I activated once my location feature then activated RedMoon auto-turn-on feature.

Here, I feel I miss a feedback from RedMoon to show me which position was acquired if any.

[Backend] Update preference implementation

There's some duplicate code for changing preferences. I was looking into refactoring this, and came across some information that the approach used right now is deprecated. The new approach uses an XML file for each fragment, so you can (for example) add android:dependency="mSwitch" and the setting will automatically gray out if the main switch is disabled, without needing to write any custom java.

FWIW, the code is generally really nice. I don't know much Java or Android-specific stuff (but I do know C -- pretty close), and it was very clear what was going on.

Add Shortcut to activate/deactivate

Hi,

Please add shortcut to activate /deactivate.
By enabling this tasker is intergrated via autoshortcut application.
Also, it will allow users to have a widget to turn on/off.

Automatic turning, based on location

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.

Android Wear Support

Android Wear support for watches, to set the same screen filters on the watch.

Can't press on the Install button while running red moon

If I want to install an application over F-Droid or directly over an APK and running red moon while I want to install an application, I can't press on the install button, but if I then switch red moon of, I can press on Install. I haven't Google Play Services, so I can't test if it appears on an installation from Google Play, too.

Seekbar preference cleanup

  • Only show the preview when dragging a seekbar (not when pressing and holding down without dragging, since this can result in a buggy-feeling "flashing" experience.
  • Refactor seekbarprefs to re-use code.

Here's a bunch of thoughts about filtering. I couldn't decide where to draw lines so I'm just going to dump them all here.

  • Dragging works really well and is really useful.
    • As a user (dark theme), "I wish I could preview what app X looks while the filter is active."
    • As a designer, I suspect that a much simpler solution would serve the user just as well. I'm going to keep thinking about what that should be.
  • For longer taps, the preview flickers on/off
  • For longer taps or if you press and hold, the temp/intensity/dim used is the previous setting, not the new one.

Disclaimer: I didn't look at logs, so I'm hypothesizing.

I looked at this a little bit, and it seems like 'OnSeekBarChangeListener` isn't getting called until I lift my finger. If so, that's a bug in android's seekbar, not red moon.

  • I noticed the three seekbars each have their own class, but contain a lot of duplicate code. I wonder if there is a way to refactor...

It seems like the biggest barrier to refactoring would be the moon icons. You could still keep the three separate classes, but make them extend a new class that contains all the duplicate logic... but I also wonder if we could just remove the icons. The only unique things are:

  • The icons are always visible
    • That seems valuable.
  • Each value is shown separately
    • I'm not convinced this is valuable. Happy to hear arguments that prove me wrong, though.
  • Instead, we could have a single moon icon next to the filter name and also in the dropdown.
    • Then you also get the benefit of being able to compare different filters visually

Red Moon on Google Play store?

Is there any chance to release Red Moon on Google Play store?

I am cautious to use apps from F-droid that are signed with a single F-droid key, not the keys of their developers.

If you don't wish to release on Play store the alternative would be to make a Red Moon F-droid repository or simply release the developer-signed app on Github.

Thanks for your consideration.

Cannot find location

Trying to find my location when location services are turned off gives me a toast saying I need to enable location services.

I enabled them, and it's been searching for my location this whole day by now.

Might be a problem with my shitty GPS, but I can't manually set my location either.

What do?

Make the notification like in 2.6.3 again

Hello,

the notification in 2.6.2 was pretty usefull, since you could make it stop to apere during the day. The new notification is ab it annoying, since you have to kill the whole app in order to make it go away

Rgds schabi

UI Tweaks for RTL locales

There are some twaeks in UI for RTL languages. For example, handles should move from right to left for increasing the value and the resume button should point to the left

This is what it looks like now in Persian locale:
screenshot_ - - - - -

This is what it should look like:
screenshot_ - - - - -

[Code cleanup] getShadesPowerState()

On line 85 of ShadesPresenter.java, when the FAB is clicked, it checks to make sure ShadesPowerState is on. This check is unnecessary because the FAB will not display if ShadesPowerState is off.

I don't know if there are more checks like this scattered around the code (notifications? automatic toggle?), but if there are they can probably all be removed. The only actions possible while PowerState is off are changing the theme, sending feedback via email, and visiting this github page, none of which change their behavior based on PowerState.

There's already an onShadesPowerStateChanged() function -- it should be all that is needed, I think.

Add an option not to dim the status bar

Hello, I've used Darker Pro (a non-free screen filter) for a long time and would like to move to Red Moon as I believe the filter is better, however it lacks some features which are useful.

  • Automatically pause when installing APKs
    Darker detects when an APK is attempting to install and temporarily pauses.
    See #64
  • Notification panel buttons
    Easily enable/disable the filter via a button toggle instead of having to open the application.
    (Red Moon's screenshots appear to show this functionality but it doesn't appear in Android 4.2.1 so I'm unsure if this is a bug.)
  • Option to keep status bar brightness
    When enabled the filter works as usual except for over the status bar region. This is very useful for bandwidth monitoring or when apps have unclear icons.

Sorry to lump several queries into one issue but I thought it might be easier for you to dismiss if you weren't interested. Thank you for your work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.