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

Hoping for more detailed Notifications and offset by the degree of elevation of the sun #522

Closed
Timo-Fi opened this issue Dec 7, 2021 · 6 comments · Fixed by #686
Closed

Comments

@Timo-Fi
Copy link

Timo-Fi commented Dec 7, 2021

Hello Sir Forrest Guice, this is really a majorly great app already! I really hope for more verbal and structured Notifications from then SunTimesWidget. Now it just says e.g. "Blue hour", when it actually is: "30 minutes till the end of evening blue hour". Another enhancement that I'm hoping is an option in addition of the time offset, the offset by the elevation degree of the sun (plus or minus) , so that e.g. "35 degrees past sunrise", or "8 degrees till noon", or "11 degrees past noon" or would be possible, (for sunbathing purposes). I hope for more verbal & structured Notifications because the 'Voice Notify' app (from F-Droid) speaks the Notifications out loud (of apps selected by the user), the TTS message items in that app are the following: #a = App Title, #t =Ticker, #s = Subtext, #c = Content title, #m = Content message, #i = Content info. The user can combine some/all of these to construct the sentence that is spoken.

I encountered with two very tiny issues: In an Android 7 device all the widget modes are available, but e.g. the font of the clock widget does not scale when scaling the widget. In an Android 11 deice the "Sun Position 4x2" widget (the rectangular world map) can not be had at all. When I paste it, it will be the round world in 4x3, it can be scaled, in 1x1 it shows the Altitude & Azimuth, in 2x2 it show the same as 1x1 but font does not enlarge, in 3x1 and in 4x1 and in 5x1 it shows the 'Sun Position 4x1" widget (night/day bar) and in that the content does scale properly. In 4x4 and 5x5 it will be the round world map.

I'm so very happy I found Your app from F-Droid. It took many many hours for me to be able to post here. Now I'll engage into a fight with the masters of the interverse so that I can send a little something towards you.

Greetings form the frozen Finland!

@forrestguice
Copy link
Owner

Hi. Thanks for the kind words, and the great feedback.

I've been working on enhancing the alarms recently, so I spent a little time investigating the technical aspects of these features. I think both are doable. I think the improved notifications will be part of the next minor release (v0.14.0), but I will need to give additional thought to the "offset by degrees" feature / sunbathing usecase - it might be built-in eventually, or something that's available as an addon (would provide a lot more flexibility).

For the notifications, we can assign the 'content title' and 'content message' (I'm not sure about those others), but currently both are just set to the event name. It should be easy to enhance the message to something that can be spoken, but if I understand correctly, the reminder notification needs to change depending on when you look at it. Its "30m until the end of evening blue hour" now, but "29m" a minute from now, and so-on, until finally the alarm sounds. I think that means the notifications need some kind of update cycle (like the widgets) - every minute the notification message needs updated text. The potentially challenging part.. I'm not sure its actually possible to update a notification so much as we're just replacing it (with another one with the same id). The notifications are like "post it" notes, we write them and stick them to the tray, but now we need to write a new one every minute. A possible side-effect is the notification might be repeatedly read out loud. Anyhow, there's now some (untested) code in the notification-update branch that implements this, that's likely to make it into v0.14.0 (sometime in January).

Regarding the bugs in the widgets - I've opened another issue to track and fix them. I would be interested in seeing a screenshot of the clock widget failing to scale, but the other problems with the map widget sound all too familiar. I might need more info about your device's screen size /resolution to reproduce and fix it.

@Timo-Fi
Copy link
Author

Timo-Fi commented Dec 12, 2021

Hi! I try to explain the issue that I seem to be having by a simple example. When I set up three Notifications (not alarms):

A: at 30 minutes before the solar noon
B: at the solar noon
C: at 30 minutes after the solar noon

then, at each of those A, B, C times of the clock, the current Suntimes will rise up a notification, so three notifications in total, that have exactly the same content: "Suntimes ⏎ noon". For me this is confusing.

But I have now found a way to get such notifications that I'm looking for! The Label text that resides on the right-hand side of the alarm/bell -toggle (that normally reads as "Alarm" or "Notification") can be changed to what ever the user choose it to be, and it replaces the "Content message" (and luckily does not affect to the "App Title"). So, I just need to spend more time when creating the notifications, as I need to write those Labels individually (and also to set up some "TTS Text Replacements in the Voice Notify" -app). I now I have notifications that e.g. says out loud:

At the time of "evening astronomical twilight (end)" plus 3 hours:
"Suntimes notification, it is now three hours past the end of evening astronomical twilight"

At the time of "solar noon" minus 30 minutes:
"Suntimes notification, it is now thirty minutes due the solar noon".

At the time of "solar noon":
"Suntimes notification, it is now the solar noon".

At the time of "solar noon" plus 30 minutes:
"Suntimes notification, it is now thirty minutes past the solar noon"

Iit is not too easy to create these notifications, since I need to construct phrases individually, and in such way that they play together, but do not conflict with, the "TTS Text Replacements" that I have made in the "Voice Notify" -app. So, more structured notifications surely would not hurt at all, but there is this way around my issue. And, also/therefore I see no need for repeated notifications, in this scenario. All the above is related to Notifications, (the bell selected from the the bell/alarm -icon), so alarms will not be heard at the time of the selected celestial event, but a notification at the time of the event ± offset. (However, I have muted the sounds/tones for these notifications, as for me the TTS is perfectly enough for them).

About my hope for the "offset by degree of sun" enhancement: I believe that it would be very very similar, in function, to the currently existing "±offset by time". The only difference is the magnitude of the offset, just the "± HH:MM" versus "± elevations of the sun". This enhancement would provide more easier and more precise notification setup, for many daily events.

About the scaling issue of the clock widget, my device ( https://www.devicespecifications.com/en/model/ba8f470f ) has no screen recorder, as soon as I find a secure one, that actually works OK, I'll upload a video. But it is a very very tiny issue and the device in question is old'ish. I will soon be testing with more recent devices.

Anyhow, the Suntimes is already a majorly great app, I've thrown several sun tracking apps and URL:s into the waste bin already.

Thank you very much!

N.B. I did/tried to send to you some cups of coffee, but I've got the feeling that they were drank by Paypa, as I got no kind of confirmation on their website, and they have not sent any confirmation email, and I do not see it on my Paypal account. I'll set things straight as soon as I see it the next bill from the credit card company.

@forrestguice
Copy link
Owner

Ah. Thank you for that clarification. This is indeed much easier than what I had imagined, which I'm realizing is a different feature. I basically imagined the content from the 'note area' in the app but as part of the alarm reminder. As an extension of that, I was thinking a normal notification might be "pinned" - its always displayed; x min until sunset, etc.

It seems to me the immediate issue is that the offset text isn't part of the notification. Its true you can work around it, by setting a label, but that's a pain, and maybe obscure (the field is basically hidden by the 'type' text when a label hasn't been set). It should be easy enough to fix it so that when an offset is applied, its also part of the notification message, and then add alternate more natural sounding phrases. e.g. instead of "evening blue hour (end)", its "30m before the end of evening blue hour". A more advanced feature could allow using "title substitutions" within the alarm label, similar to the widgets or actions, to have more control over the format.

I should be able to reproduce the widget issues with an emulator using that device info - thank you. BTW, my devices (mostly older), are able to take a screenshot by holding "power" + "volume down" simultaneously. I'm not sure what the binding is for others.

Also thank you very much for the donation. I don't get much through that link, so it does basically amount to a coffee (or some other occasional luxury). I appreciate the gesture more than anything. Paypal does take a pretty good "sip", but I can't login at the moment - it seems there is maybe some ongoing technical issue on their end.

@Friptick
Copy link

Hijacking this issue because it contains the keywords "notification" and "offset". @Timo-Fi says:

When I set up three Notifications (not alarms):
A: at 30 minutes before the solar noon

This is the feature I would like! To set a notification or alarm for x hours x mins before or after an event, for example after sunrise or before solar noon. In other words: a simple offset for the alarm or notification.

Is this possible already? I just came here to ask for it because I don't see it. This is an amazing app, thank you for your work.

Android 8
F-Droid latest

@forrestguice
Copy link
Owner

@Friptick Hi. Yes, this is already possible. From the 'edit alarm' screen (after choosing an event), under the Schedule label, there is a button at, alongside the event, location, and repeat options. This should be what you're looking for. You aren't the first one to miss it, which makes me think there needs to be an alternate way to get to all of these options (maybe a menu).

@Friptick
Copy link

@forrestguice Ah there it is! Yes, maybe put "at | offset" or "< at >" or something to make it obvious that it's a button with options. Very useful feature, anyway. Thanks again.

forrestguice added a commit that referenced this issue Dec 31, 2021
more descriptive notifications; always include the 'offset'; e.g. "5m before sunset" instead of just "sunset". #522
forrestguice added a commit that referenced this issue Jan 1, 2022
Fixes the notification offset message to use locale specific quantity and gender rules (api24+); e.g. "del", "de la", "de los", "de las".
#522
forrestguice added a commit that referenced this issue Jan 12, 2022
sunposition widgets now check widget aspect ratio before resizing to square map; fixes a bug where the rectangular world map is unavailable on some devices (automatically resized). (#522, #535)
forrestguice added a commit that referenced this issue Feb 5, 2022
adds an overflow submenu to AlarmEditActivity; provides an alternate way access/discover alarm features. #416 #522 #537
@forrestguice forrestguice mentioned this issue Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants