The Sun Clock Widget for Android

SunClockWidget icon
The home screen of an Android tablet or phone is where you put the shortcuts to your favourite apps. Android also allows widgets on the home screen, A widget allows an app to fill part of a home screen with its content. It is typically used to display information such as weather predictions, stock market developments, news, and other such small pieces of information. One particularly popular piece of information to show is the current time; in other words: a clock.

Although there are plenty of clock widgets for Android, I was not able to find the perfect widget: one that would show time at any place in the world, and also some information about sunrise, sunset, and the elevation of the sun. Knowing when the sun rises and sets is useful for anyone from hikers to city dwellers, but personally I also feel closer to people in other places on earth when I know if it is day or night there. Even better is to also know when the sun is low, because that changes the mood of the place so much. Photographers and cinematographers are well aware of this effect: they call the period right after sunrise and right before sunset the golden hour. Similarly, the period right after sunset and right before sunrise is called blue hour. In reality the interval is not an hour; the interesting period is when the sun is close to the horizon, above and below it, and the sun doesn’t always traverse that interval at the same speed.

iconAmazingly there was no Android app that showed the sun position in a world clock. Yes, there are plenty of clock widgets for Android, some of them can show the time any place on earth, and there are apps that calculate the golden hour. However, I have never seen another app that shows sunrise, sunset, and sun position in a world clock. Therefore wrote my own widget to implement this. The result is called Sun Clock Widget, and it is available from Google play.

The central idea of SunClockWidget is to show the elevation of the sun above the horizon as time intervals: dark blue when the sun is more than 5 degrees under the horizon (night), purple when it is less than 5 degrees under the horizon (it then colours the sky, announcing that the sun will rise, or that the sun has just gone under). Above the horizon there are bands for 0 to 5 degrees (orange), and between 5 and 10 degrees (yellow). If it is higher up in the sky this is shown as light blue. Of course not all places on earth have bands that are equally long, and some places may not even have all these bands on a particular day in the middle of winter or summer.

Installing the Sun Clock Widget

SunClockWidget is for sale from Google play. It is available in all markets, and it currently has the lowest price that Google allows in each market. For example, in the Euro zone it costs 0.50 euro, because that’s the lowest that Google allows. It is only available for devices with Android 4.1 (Jelly Bean) and up, since earlier Android versions have some problematic restrictions on widgets. The Content Rating is Low Maturity only because it may need a rough estimate of your place on earth, so that it can calculate the trajectory of the sun there.

sunclock-dialogOnce you have bought and downloaded the widget, you can place it on your home screen. How that is done depends on your particular device, but usually it resembles these instructions for Google Nexus devices pretty closely. In other words, first try to long-press on an empty spot of your home screen, and see if you get a menu option to install a widget. On other devices you may have to browse the list of all apps, and add a `shortcut’. Also note that sometimes widgets are in a separate section.

After the widget has been placed on the homescreen, you’ll get a dialog to configure the widget. First of all, you can choose between a round clock or a long ribbon. In both cases the same information is shown: the current time, and the position of the sun over or under the horizon.

You can also choose for which place on earth you want to see the path of the sun. ‘Here’ means the place of your phone or tablet. If  you take it to another place, it will show the path of the sun for that place. You can also select the name of town or city from a long list of such places built into the program. Finally, you can specify a geographical latitude and longitude.

Then you can specify the timezone that the clock should use. Normally you should select ‘Same’, which uses the time zone at the place on earth of the sun path. You can also choose ‘Here’, which uses the time zone that the phone or tablet uses for local time, or you can select a time zone from a built-in list. If you specified the place to show the sun path as a latitude and longitude, Sun Clock Widget is not smart enough to determine the time zone at that place. Instead, it will simply use the local time zone of the phone or tablet.

Finally, you can specify a label for this clock. That can be any text you like. If you leave the label empty, and you selected a place as the location of the sun path, then Sun Clock Widget with use the name of that place as the label.

That’s all there is to configure! Tap OK, and your widget is ready. However, if you wish you can enlarge it. Long-press the widget, until a rectangle and four dots appear. You can drag the dots to modify the screen area of the widget. Tap somewhere outside the area of the Sun Clock Widget to dismiss the resize rectangle.

Sun Clock Widget will always try to use the given area as efficiently as possible, but obviously a round clock fits best in a roughly square area, whereas a ribbon clock fits best in a narrow but long area. Note, however, that Sun Clock Widget is also happy to use long narrow vertical areas.

Leave a Reply

%d bloggers like this: