Giter Club home page Giter Club logo

suntimeswidget's Introduction

Suntimes

Android app (and widget collection) that displays sunlight and moonlight times for a given location.

Get it on F-Droid

F-Droid GitHub release Android CI

Displays sunrise and sunset, twilights (civil / nautical / astronomical), blue and golden hour, solstices and equinoxes, moonrise and moonset, moon phases and illumination.

Suntimes Alarms
An alarm clock for Suntimes.

Suntimes Calendars
A calendar provider add-on for Suntimes.

Solunar Periods
A hunting and fishing add-on for Suntimes.

Natural Hour
A 24-hour clock & roman timekeeping add-on for Suntimes.

Suntimes NFC
An NFC Addon for Suntimes Alarms; dismiss alarms with an NFC tag.

Interval Midpoints
A midpoint calculator add-on for Suntimes Alarms; schedule alarms for event midpoints.

The app:

  • displays the current time (system time zone, custom time zone, or solar time)
  • displays the time until the next rising/setting event.
  • displays the sunrise and sunset, blue and golden hour, and twilight times (civil / nautical / astronomical).
  • displays the current moon phase, illumination, moonrise, moonset, lunar noon, lunar midnight, apogee, perigee, and major phase dates.
  • displays the current sunlight and moonlight projected over a world map (basic equirectangular, blue marble, or azimuthal maps).
  • displays the solstices, equinoxes, and cross-quarter days, and notes the time until the next event.
  • displays the sun's current position, and its position at sunrise, sunset, and noon.
  • displays the moon's current position, and its position at moonrise and moonset.
  • includes an Alarm Clock that can set a repeating alarm or notification for the next sunrise or sunset (or other rising/setting event).
  • includes a "Quick Settings" tile that displays information as part of the settings tray.
  • can display the configured location on a map (requires a map application) and configure the location from a map (using geo intent).

The app:

  • does not require GPS. The location is manually specified by default (and optionally obtained from GPS).
  • does not require network connectivity (or other unnecessary permissions). All calculations are performed locally on the device.

Widgets are (re)configurable:

  • location (latitude, longitude, elevation).
  • time zone (system / custom), sidereal time (lmst, gmst), or solar time (local mean time, apparent solar time).
  • user-defined titles (supporting limited substitutions).
  • misc. options: "use elevation", "show seconds", "show noon", and "show comparison", etc.

Widgets are themeable and provide:

  • a theme editor and support for basic custom themes.
  • a (default) dark theme (and dark w/ semi-transparent background).
  • a (default) light theme (and light w/ transparent background).

Widgets are resizable and include...

Clock widgets:

  • 1x1 digital clock widget that displays solar time (or a given timezone).

Date widgets:

  • 1x1 date widget that displays the date with a given calendars (Chinese, Coptic, Ethiopian, Gregorian, Hebrew, Indian, Japanese, Julian, Korean, Minguo, Solar Hijiri, Thai Solar, or Vietnamese).

Sun widgets:

  • 1x1 sun widget that displays the sunrise or sunset time.
  • 1x1 sun widget that displays both sunrise and sunset times.
  • 1x1 sun widget that flips between sunrise and sunset times.
  • 2x1 and 3x1 sun widgets that displays the sunrise and sunset times, and the difference in daylight between today and tomorrow (or yesterday).

Moon widgets:

  • 1x1 moon widget that displays moonrise and moonset.
  • 1x1 moon widget that displays next major phase.
  • 1x1 moon widget that displays phase and illumination (or phase only, or illumination only).
  • 1x1 moon widget that displays the number of days since the new moon.
  • 2x1 moon widget that displays moonrise and moonset, phase, and illumination.
  • 3x1 moon widget that displays upcoming major moon phases.

Solstice widgets:

  • 1x1 solstice widget that tracks the upcoming solstice, equinox, or cross-quarter day.

Position widgets:

  • 1x1 sun position widget that tracks the sun's altitude and azimuth.
  • 1x1 sun position widget that tracks the sun's declination and right ascension.
  • 3x1 sun position widget that displays the lightmap graph, and tracks the sun's altitude and azimuth (current, sunrise/sunset, and at noon).
  • 3x2 sun position widget that displays current sunlight and moonlight projected over a world map.
  • 3x2 sun position widget that displays the sun's altitude as a line graph.


Additional screenshots can be found on the project wiki and in the gh-pages branch.

screenshot1  screenshot2  screenshot3

Privacy and Permissions

Suntimes does not collect, store, or transmit personal user data. It contains no advertising, no analytics, no trackers, and no unnecessary permissions. https://github.com/forrestguice/SuntimesWidget/wiki/Privacy

The app benefits from the following permissions...

Permission Since Version
ACCESS_COARSE_LOCATION To get current location. v0.1.0
ACCESS_FINE_LOCATION To get current location (GPS). v0.1.0
BOOT_COMPLETED To restore active alarms when the device boots. v0.11.0
POWER_OFF_ALARM To wake the device from the power off state. v0.14.0
READ_EXTERNAL_STORAGE To play alarm sounds located on the SD card. v0.11.5, v0.13.8 (api≤18)
SET_ALARM To interact with the system AlarmClock app. v0.1.0
REQUEST_IGNORE_BATTERY_OPTIMIZATIONS To help ensure reliable delivery of alarms. v0.14.11
WRITE_EXTERNAL_STORAGE To export data (places, themes, etc.) to file. v0.2.2 (api≤18)

Version v0.13.8 removed READ_EXTERNAL_STORAGE for api≥19 (replaced with persistent URI permissions).

Version 0.9.* contained the following additional permissions (removed in v0.10.0)...

Permission Version
READ_CALENDAR To interact with the Calendar app (access events). v0.9.0
WRITE_CALENDAR To interact with the Calendar app (add/remove events). v0.9.0
READ_SYNC_STATS To interact with the Calendar app (access custom calendars). v0.9.0
WRITE_SYNC_SETTINGS To interact with the Calendar app (add/remove custom calendars). v0.9.0

Donations

Do you find value in this software? Pay as you feel.

paypal Donate using Liberapay

I want to express my thanks to those who have sent me something. This is greatly appreciated.

Bug Reports

Use the issue tracker to submit a bug report or a feature request.

When reporting a bug please be detailed as possible. What did you expect the app to do, what did you actually observe? Include the app version number in your report. Other useful information includes the Android OS version (and sometimes your specific device model).

Legal Stuff

Copyright © 2014-2024 Forrest Guice

The source code is available under GPLv3 (https://github.com/forrestguice/SuntimesWidget).

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Icons and images from:

Libraries used:

Project Contributions

German translation by Henrik "HerHde" Hüttemann, Wolkenschieber, xnumad, and CSTRSK.
Polish and Esperanto translations by Verdulo.
French translation by Jej, Aloha, ldmpub, and grenagit.
Hungarian translation by Erci.
Catalan and Spanish translations by Raulvo and gnusuari0.
Basque translation by beriain.
Norwegian translation by FTno.
Italian translation by Matteo Caoduro and GiovaGa.
Traditional Chinese translation by ft42, and James Liu.
Brazilian Portuguese translation by NetoSilva, Nelson A. de Oliveira, and Enrico S. B. Fraletti.
Russian translation by Ruslan Chintsov, and Adelechka.
Dutch translation by Joppla.
Czech translation by utaxiu.
Simplified Chinese translation by James Liu, and sr093906.
Arabic translation by Alelg.

Contributions to the project are welcome.

suntimeswidget's People

Contributors

adelechka avatar beriain avatar cao- avatar cstrsk avatar das-nichts avatar efraletti avatar erikawunderli avatar forrestguice avatar ftno avatar giovaga avatar gnusuari0 avatar grenagit avatar herhde avatar jamesliu96 avatar jellyrolljunior avatar joppla avatar ldmpub avatar mstfelg avatar naoliv avatar pauloneto15 avatar pggdt avatar poussinou avatar raulvo avatar rchintsov avatar sr093906 avatar titanicbobo avatar utaxiu avatar verdulo avatar wolkenschieber avatar xnumad 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

suntimeswidget's Issues

gps prefs ignored

The gps prefs (minAge, maxAge, and maxElapsed) appear to be ignored - the defaults are always used.

localized default lat/lon

Allow translations to supply their own default lat/lon, so that even a poorly configured app displays reasonable looking times.

At the moment the default is hardcoded from WidgetSettings. There is the configHint_location_lat and lon values but they are strictly textview hints (and should probably indicate the expected format (DD) vs suggesting a default).

timezone setting ignored

The timezone setting is being ignored when displaying 24 hour time.

It always displays using the system timezone, while displaying a mismatching label. Swapping timezones appears to do nothing, and if you aren't already aware of what the times are supposed to be beforehand, it makes it look like the calculation is completely wrong. If you are using a locale that toggles the 24hr time setting (de vs en), the problem appears to be locale dependent. Since custom timezone is off by default its not immediately noticeable.

using default lat/lon 35, -112...
System Settings -> Date & Time -> 24hr time -> on
System Settings -> Date & Time -> Select timezone -> America/New York
Suntimes App -> custom timezone -> America/Phoenix .. the reported sunrise time is ~ 08:45 (right time for new york, but is actually 5:45 in phoenix)

System Settings -> Date & Time -> 24hr time -> off
System Settings -> Date & Time -> Select timezone -> America/New York
Suntimes App -> custom timezone -> America/Phoenix .. the reported sunrise time is ~ 05:45 (right time)

The bug is present in v0.1.0, v0.1.1.

No Data Source

Ahoi,
in the general settings, there is only a %s "selected" as the Data Source by default.

Greetings
HerHde

Widget Preview

Fix the widget preview; it currently shows 'example', at minimum it should show the half circle drawables.

Permissions <ACCESS_COARSE_LOCATION> are declared but not used

Hello, I'm Denis Bogdanas, a research assistant at Oregon Stat University.
I'm working on a tool that automatically introduces runtime permission checks and requests for Android 6 apps. As part of this study I analyzed this app. I was looking at the way permissions are referred in the code.

This app declares permissions <ACCESS_COARSE_LOCATION> in the apk manifest, but doesn't have any code that requires them. It is possible that source code doesn't declare the permissions. I only analyzed apk builds from f-droid. Yet android build mechanism may introduce them when the app uses certain libraries:

https://commonsware.com/blog/2015/06/25/hey-where-did-these-permissions-come-from.html

It won't create any problems on Android 6, but on Android 5- users may wonder why the app needs these permissions and be skeptical of installing the app.

Do you think this is an issue?

best regards,
Denis

"Settings->Places" broken api 10

The "Export Places" and "Clear Places" items are non-functional. They respond to taps but no action occurs - the export/clear dialogs should be displayed.

tested using v0.2.1 against api 10.

Internationalisation

Ahoi!
First of all: Thank you very, very much for this app. I had a widget for sunrise/-set on my whishlist for months, now I found it on F-Droid.

I want to contibute a german translation. It seems that you there is no internationalisation yet, how can I help you without coding in java?

Also there is a file named app/src/main/res/values/styles.xml~, are you using emacs? ;-)

German translation

Ahoi,
could you give me some help with the german translation, please?

1.- daylenght - could you please explain those to me? How are they calculated, which differences are this?

    <!-- Field: length of day
         The hours in the day field(s) that appears below the table (main activity).
         (layout/info_time_daylength.xml)
    -->
    <string name="length_day">in the day</string>
    <string name="length_light">of usable light</string>

2.- daydelta - where do these strings appear?

  <!-- Field: today/tomorrow time delta
       (layout/info_time_daydelta.xml)
  -->
  <string name="delta_day_tomorrow">Tomorrow will be</string>
  <string name="delta_day_yesterday">Yesterday was</string>

3.- Note - I've translated it as Kurzinfo, which means something like short information, don't know any better approach yet, because note is Notiz in german, which primarily means memo, a little bit misleading IMHO.

4.- Widget Setting: date mode - I can't find these within the app?!?

  <string name="configLabel_date">Date Settings</string>
  <string name="configLabel_date_mode">Mode:</string>
  <string name="configLabel_date_custom">Date:</string>

5.- gps_lastfix, gps_keeptrying and the toast - Could you please provide a screenshot of their appearance?

Except of these, the translation is almost ready for a first release ;-)

Greetings
~HerHde

Times are not right

All times are very wrong as sunrises are shown during the middle of the day for example. It seems that somehow it doesn't get the right time from the system.

solar time mode

Add an option to display in either "local mean time" or "apparent solar time" in addition to current option to change the timezone.

To implement... change the "time zone" dialog into a "time mode" dialog and add a new mode "solar time" (in addition to "system time zone" and "user-defined time zone"). When selected it offers a choice between "local mean time" and "apparent solar time".

Add an option to change the language of application

Nuntempe mi tradukas la Suntimes aplikaĵon al la Pola (pl) lingvo, poste mi volos fari Esperantan (eo) tradukon. Ĉu vi povus aldoni agordon por ŝanĝi lingvon de programo? Tio estas grava precipe por Esperanto, ĉar ĝi ne povas esti elektita en Android kiel ĉefa lingvo de sistemo...

Now I'm translating the Suntimes app into Polish (pl) language, later I want to make translation into Esperanto (eo). Could you add setting to change program language? This is important especially for Esperanto, because it cannot be selected in Android as default system language...

New permissions?

An upgrade from 0.2.1 → 0.2.2 asks for these new permissions:

  • Modify or delete the contents of your SD card
  • Test access to protected storage

I could not find either in the changelog or the code what they might be used for. Would it be possible to clarify? Cheers 😃

"Settings->Language Settings" broken api10

The custom language listpref should be disabled when the mode is set to system but it is not. It is possible to select a custom language (and have the app update to that language) despite the mode being set to system.

tested using v0.2.1 against api10

Times of sunset unreadable on any non-english version

I've checked on 2 phones (with smaller and bigger screen) and times of sunsets and solar-noon go out of the screen on both Polish, Esperanto and German translations. What can be do to fix it:

  1. Shorten the strings "sunrise_short" and "sunset_short", eo/pl versions are ready, now @HerHde needs to update German translation.
  2. The date is currently displayed in 2 lines "Today |next-line| 2016-08-16", maybe in similar way display the column "Rise" and "Set" - display the icon of Sun above or in the next line.
  3. There's lots of unoccupied space between a date and the word "Rise", so maybe align the column "Set" to the right corner of screen, and make width of column "Date" variable.

past date warning

Show a warning icon next to the datefield when configured to the past. I overlooked the "past" label while pressed for time on a recent hike, so the potential for confusion definitely exists. Draw attention to the date when the configuration is out of the ordinary.

request feature, solstice tracking

I love your app
I have been using a outdated app for years
It's nice to see a new app being developed
I would love to see a feature to track
Summer and winter solstice (longest and shortest days of the year)
maybe even a count down between solstice widget option

Keep up the great work.
I get your app from fdroid.It's nice to see it there.

About Activity

Create an About activity:

  • one line app desc
  • link to: this project
  • link to: mikereedell/sunrisesunset-java
  • legal stuff: copyright & gplv3 notice
  • instructions for configuring / using the widget

solar noon incorrect when rise/set spans today/tomorrow

Using a user-defined timezone set to UTC, the rise time is 1:24PM UTC and set time is 1:16AM UTC (next day). The solar noon time should be 7:20 PM, but instead shown as 7:20AM. When using the system timezone the solar noon time is correctly shown as 12:20PM, and when using other user-defined timezones (EST for example) the solar noon time is correctly shown in that timezone.

improve locationConfig copy / paste

It was pointed out in #32 that separating lat/lon into two fields vs one makes copy/paste a hassle.

It would be nice if it was possible to copy a properly formatted lat, lon (DD) string from one app, and then paste it filling both fields at once. It would also be nice if copying from either field copied both fields -> lat, lon ready to paste elsewhere.

app crash (latitude edge case)

the app crashes ("unfortunately has stopped") on far northern/southern latitudes on specific dates where a rise/set transition occurs - i.e. a rise/set event occurs one day, but doesn't occur on the next.

tested using v0.2.3 on api19..

  • start with clean app installation
  • set location to 83.124, 23.1592
  • set date to Feb 19. 2017
    --> crashes on apply date

At 83.124, 23.1592, astronomical twilight rises/sets on the 18th, but no longer does so on the 19th. ...should be reproducible with other dates/locations where a similar transition occurs.

License Stuff

Apply GPLv3 header and copyright notice to all source files.

dialogs lost on orientation change

with v0.1.1 dialogs (and their state) were properly retained on orientation change, but from v0.2.0 onward they seem to be lost; the dialogs are now dismissed (as if canceled).

Use SemVer?

Ahoi Forrest,
now I've got a proposal: How about using a semantic versioning scheme?

For example, the version bump from 0.1.0 to 0.1.1 could have been a 0.2.0, because you've added i18n.

Greetings
~HerHde

widget doesn't update

The widget doesn't update the sunrise/sunset times each day without running the app itself.
🔶

alarm set incorrectly with user defined timezones

The alarm is set incorrectly when the user-defined timezone mismatches the system timezone. The alarm time needs to be converted to the system timezone (same as used by the alarm application).

example: user-defined timezone is set to UTC, the current time is 5:29AM UTC (system time 10:29 MST), the alarm should be set for sunrise at 1:24PM UTC (~6:24AM MST), but instead gets set for 1:24PM MST.

app crash on "Set Date" api10

tested on emulator api10.
"Set Date" -> the dialog fails to appear, instead the app crashes.

java.lang.IllegalArgumentException: current should be >= start and <= end
            at android.widget.NumberPicker.setCurrent(NumberPicker.java:288)
            at android.widget.DatePicker.updateDaySpinner(DatePicker.java:397)
            at android.widget.DatePicker.updateSpinners(DatePicker.java:383)
            at android.widget.DatePicker.init(DatePicker.java:379)
            at com.forrestguice.suntimeswidget.TimeDateDialog.initViews(TimeDateDialog.java:126)

values are -1 -1 -1 (init called before values are initialized)
tested on api19 no crash.

Use network location instead of GPS

I think it would greatly help if the app (haven't tested the widget) would be able to get the location from the network location provider. Currently it will always try and get a GPS fix. This makes it basically useless as long as you are indoors.
The increased error rate should not matter much, as times won't change within a few hundred meters anyway.

app crash Settings->General->DataSource api10

The app crashes ("has stopped unexpectedly") when trying to bring up the "data source" preference from "General Settings". Tapping the pref causes the crash (list of choices isn't displayed).

Tested using v0.2.1 w/ api10 (emulator).

app crash on SettingsActivity

On ActionBar -> Settings the app is crashing; the Unfortunately, Suntimes has stopped dialog is displayed.

Tested using v0.2.1 on a Toshiba AT270 (7" tablet) (Android version 4.0.3) (api 15).

Tested on a phone running Android 4.4.2 (api 19).. crash doesn't occur.
Tested on emulator running Android 4.1.1 (api 16) .. crash doesn't occur.

configuration: set the lat / lon from street address

SettingsActivity feature; enabled for "custom location" mode.

Add a button that allows setting the latitude/longitude to a location determined by street address (geocode address -> set lat/lon on UI -> toast).

Option to select 12h/24h

It seems only 12h format is supported right now. Can 24h format be added into the settings? My phone locale settings is set to 24h by default.

configuration: set the lat / lon from current location

SettingsActivity feature; enabled for "custom location" mode.

Add a button that allows setting the latitude/longitude to the location at configuration time (trigger a one-time location update -> get last known location -> set lat/lon on UI -> toast).

Does not adjust for daylight savings

The app calculates the sunrises/sunsets using the standard time of the selected time zone. If the time zone is in daylight savings time (CST vs CDT) the rise/set times are 1 hour off.

Currently using version 0.2.1 via FDroid

Table switches unintentionally

Ahoi Forrest,
another one here ;-)
The table in the main activity switches on some events that I would not expect.
It seems to switch between today and tomorrow e.g.:

  • when I am on today and click the note with the next note setting and vice versa
  • when I am on tomorrow and reactivate my screen or switch back from another app.
  • when I am on tomorrow and the clock shows the next minute.

The last two appear intended, what do you say?

Greetings
~HerHde

app icon

Create an application icon (svg) suitable for Google Play.
Export png drawables at ldpi, mdpi, hdpi, and xhdpi.

Indicate skipped dusks

Ahoi,
depending on your latitude, some dusks/twilights don't occur, like up in the north. The english Wikipedia has some Information about this, but your App already correctly shows no Values for e.g. my position:
photo_2016-07-11_16-15-23

Could you please set this empty values to none or something, so it doesn't seem broken?

Greetings
~HerHde

Inconsistent colons in the options

Ahoi,
some option names end with a :, some not. I guess this is due the appearance in the widget config, where the names are in the same line as the values.
Could you append the colons to the strings within the widget config, so there are no colons within the translations etc?

Greetings
~HerHde

Note doesn't adapt user defined dates

Ahoi Forrest!
The note displays some wrong durations, when a user defined date is set. It seems to use the difference between the selected date and today's dusks etc.

Examples:

  • Date is set to 2016-07-25, it shows ~2d 14h until sunrise.
  • Date is 2016-08-01, ~4d 1h until sunset.

I hope this helps.
Greetings
~HerHde

configuration: theme editor

Add a 'theme editor' activity that allows the user to select options and save them as a 'named theme'.

  • action: save to theme name OR autosave unsaved changes as "user defined"
  • action: export themes to xml
  • action: import themes from xml
  • UI: background drawable (or color)
  • UI: background color selector
  • UI: background transparency selector
  • UI: background corners selector
  • UI: title size selector
  • UI: title color selector

touch lat/lon fields to edit

Manually editing the lat/lon is potentially confusing because the "push marker" button used to start editing is easily confused as just an icon, and touching the disabled edittext currently does nothing.

The button could look more like a button, but its also intuitive that touching the fields should start editing.

from #32

"Settings -> Widgets" broken api10

ActionBar -> Settings -> Active Widgets transitions to a blank screen when using api10 (tested in emulator). Pressing back from blank screen navigates back to the SettingsActivity.

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.