OnScreenClock v0.7.4f

Short version

Maintenance update to stay compliant with Google Play store.

Although functionally, nothing changed, a lot has changed under the hood, so let me know if you experience any problems.

Rant

You may have noticed a lot of updates flying by last week. Over the past few months a ton of policy violations accumulated. I postponed updating the app since I am redeveloping the app from scratch and wanted to avoid going through the whole mess of getting the app compliant and approved, basically investing time in an app that will be deprecated soon.

However, I realized that rebuilding the app would take longer than expected (after all, it is an accumulation of work over 10 years) and that it would put too much pressure on me to deliver the app soon. If I didn’t take any action, the current app would have been removed from the app store last weekend, so I decided it is better to make the app compliant and provide continuity. It took me a whole week, each day putting in hours after work, to get the app approved.

As any developer will confirm, an app store approval can be a huge struggle. Even when you fix everything, your app still gets rejected. I noticed a bug in the review process in which they give feedback for an older version of the app. They claimed I repeatedly asked for permission even if the user granted permission. I fixed the bug, but they kept rejecting for the same reason. I filed an appeal asking for clarification, they responded the exact same thing (so appeal was basically useless). Some policy fixes need several days to be picked up and acknowledged by Play store. It only seemed to move forward after these policy fixes “trickled through”. I had so many fixes to do, from changing to app bundles, changing signing, upgrading to allowed versions of billing/analytics, upgrading android target, etc that it seems the review system choked on it..

The annoying thing was: I accidentically omitted a commit for some release but that’s when the review process got into the rejection loop. A few 1000 users were experiencing a crash and the fix was ready to release, but google would fail to accept it, even though it got accepted the day before! 🙄 These days, this has a snow ball effect: because they notice my app crashes more than its peers in the same category (Utilities), Google decides it should bury your app deeper in search results, lol.

Here’s the screenshot, for your entertainment:

So, the funny thing is they caused this problem themselves and even now when the bug is fixed, it will take some time until the average crash rate is low enough and Google reinstates my reputation.

Also, for anyone struggling with rejection with the notice “Your icon does not fill the entire icon space.”: you have to specify a 512×512 icon resource, just for TV, which does not have a transparent background. But be sure that the foreground stays within the allowed bounds! Life saver 😉

Anyway, that’s it for today. I know the current app is in a bit of broken state: the overlay is blocking input on certain screens, the service is being killed after some random time (google deployed a policy change end of 2023, before that no problem).

So rebuilding the app should fix all these things 🤞 AND make it easier to add new features. 🎉

Expected: end of year.

or IOW: ETA = EOY

OnScreenClock v0.7.3

A small update adding an option to show the am/pm suffix when enabling the 12-hour clock.

Here is the changelog since last blog post:

v0.7.3 2023-03-31
=================
+ added am/pm suffix option

v0.7.2 2022-10-30
=================
* migrate to billing v4 api

v0.7.1 2022-10-07
=================
* fix untrusted touch blocking on android 12 and up

OnScreenClock v0.7.0

Soooo.. it’s been a while and although a lot of work was put into this new release, from an end-user point of view, this is merely just another “maintenance release”.

What happened?

You may know it is not easy to build apps that display stuff on top of everything, even if it is for a good reason. I tried to fix it, work around it, but I officially give up. Google is not bringing back the overlay permission. Nevertheless, using developer tools it is still possible, albeit totally user unfriendly. In theory, there is still another loop hole left, using accessibility features, but it’s only a matter of time before your app gets delisted.

Which segued nicely to the next cause of delay: the app got delisted because google does not like me linking to a donation page from the app. You would think removing this link is a small change. Android development is a moving target, so no, nothing is “simple”. πŸ˜‰ Releasing a new version often requires updating other parts of the app because of google increasing the minimum android version constraint. In this case, there were so many changes (also in ads, support libs, etc), even for a little app, it was a nightmare. Anyway, after a few beta releases, it got sorted out.

In the meanwhile, I was trying to fix the overlay permission problem: my strategy ranged from asking nice to google, to implementing workarounds, to creating a companion app, to decompiling other apps.. Today, I decided I have to accept there is no acceptable solution and just provide technical documentation on how to give the permission using a developer tool which, by definition, is user unfriendly. It is a sad solution, but better than nothing! Apologies for taking 3 years to come to this conclusion. πŸ™‚

The documentation link will show up as a QR code when you encounter the permission problem. You can also open it from within the app. Later on I hope to have an instruction video. Lastly, for rooted devices, you can simply press the button and it solves the problem magically. πŸ˜‰

What’s next?

Over the years, I collected quite some feature request. More recently, it seems TCL has released some TV sets which do not properly redraw the clock. It seems to be a bug but I will see what I can do there. I provided a tweak flag in the settings to try out certain workarounds. Let the experimenting begin! πŸ˜‰

v0.7.0 2021-01-29
=================
+ overlay permission: QR code to guide on how to grant the permission
+ overlay permission: on rooted devices you can now grant the permission with the simple press of a button
* preview color before accepting
* fix crash opening website on TV device that does not advertise itself as TV
* fix crash on some devices when moving/resizing the clock
* changing 12/24 hour format, notify state change no longer requires clockview recreation
* cleanup pref change code and prevent clockview NPE
* workaround pref: TCL devices
* admob upgrade
+ firebase analytics (can be disabled)
* bumped min SDK level to 17 (Jelly Bean 4.2.x)
* target android sdk 30

OnscreenClock v0.5.0k and ADBoverEthernet v0.8.6

a few weeks ago, ADBoverEthernet was removed from the Google Play store due to a payments policy violation. As you may know, only Google is allowed to make profit off your app, so you may not provide alternative ways of payment within the app. Since my app only provides Google’s In-App payment and still got removed, apparently it’s also not allowed to even mention other possibilities. I removed the mention of my paypal and link to my donation page on this blog. So everything should be good now. πŸ™‚ I also updated the OnScreenClock app as it shares the donation code with ADBoverEthernet.

It took me a few iterations to get the new apps released as Google forces you to upgrade the target sdk to at least 26 (= Oreo) these days. With this upgrade comes extra limitations on background processes. ADBoverEthernet used a service to launch shell commands. I changed that to use the new WorkManager api.

Changelog

ADB over ethernet v0.8.6 2019-04-24

  • show app version
  • make output window scrollable (in case of exceptions)
  • fix NPE crash when back button is pressed before webview is fully loaded
  • fix crash opening website on TV device that does not advertise itself as TV
  • store compliance
  • fix NPE’s when user revokes overlay permission while configuring the clock

OnScreenClock v0.5.0k 2019-04-18

  • trying to fix overlay permission trouble
  • bumped min sdk version from 15 -> 16
  • bumped target sdk version from 23 -> 26
  • fix crash on Android Oreo and higher when launching clock service at boot time
  • fix NPE’s when user revokes overlay permission while configuring the clock
  • fix admob crash

OnScreenClock: permission problem

Several users have brought to my attention that the clock app no longer works after a device factory reset due to a permission problem. The dreaded message appears:

Unfortunately, your device’s rom does not support a user interface for granting the overlay permission :/

These are my findings so far:

Not brand or model specific problem
When I received the first report, I uninstalled the app on my Nexus Player (Oreo) and reinstalled it and guess what: same problem. In the meantime I received reports on Sony TV and Nvidia Shield TV.

Android TV Marshmallow and higher
Yes, all trouble started with Marshmallow. πŸ˜‰ I received reports on Nougat and Oreo and tested the app also on a Nexus 7 tablet (KitKat) and Pie phone. Unsurprisingly on KitKat no problem since no permissions exist yet, on Pie my phone showed a permission dialog to grant the permission (which is good, but still abnormal).

Unfortunately, I have not encountered an Android TV rom yet which provides a user interface for granting the overlay permission (it’s not in stock android TV and none of the vendors seem to care).

Fresh installs
All reports were due to device resets, but as I already pointed out: simply uninstalling and reinstalling the clock app will exhibit the problem. Updating the app is no problem since it will preserve the previously granted permission. By taking advantage of this, I can test out a fix without impacting existing users.

 

I did a quick search on the interwebs but no luck so far, it’s kind of a niche topic after all. πŸ˜‰ I suspect a google Play Services or Play store update is the culprit but didn’t find any news yet. If it’s part of a security fix, information will be sparse anyhow.

I see several options:

  • google did a small fuckup in the play services or store (as they did with the remote not responding, deep sleeping) and might fix it (can take several months)
  • google intentionally changed the way the overlay permission is granted (and no longer wants to grant it automagically)
  • the permission not being granted anymore might be a side effect of some other policy change

Overlay permissions have always been tricky on android (tv), so let’s hope there is a solution possible.. (or a hack at least)

OnScreenClock v0.5.0

Customizable colors

Yes, you read this well! The most requested feature is finally there, although I wouldn’t call it finished just yet. As of 0.5.0 you can configure the clock and outline color by selecting a color from a predefined palette. You might have noticed I’m not that savvy with colors (a lot complained about the default green color, or was it yellow? I blame the color blindness) so I wasn’t sure which colors to include in the preconfigured palette. I found some nice material design style colors but figured people probably don’t care about material design and would want to tweak the colors anyway. πŸ™‚ So I simply configured the colors from a standard 12-color color wheelΒ and added black and white. The idea is that in a future version, you will be able to select a color from the palette and then tweak it to your liking. At first I didn’t want to release without the tweaking functionality but since this feature has been delayed for so long, I realized it’s better to release, put already quite some people out of their eyestrain misery and bear the negative reviews bitching about the fixed palette. πŸ˜‰

The reason it took so long is because I wasn’t sure how to provide a user-friendly user interface for selecting a color on a tv (using a D-pad). I now settled on the fixed palette and found peace with it since I will be offering a fine-tune option later on.

So with the big fancy feature out of the way, what else is new?

Better gamepad support

As a Nexus Player user, I was harassed by this nasty bug Google rolled out a few weeks ago which causes the remote to go to sleep at the worst possible moments, i.e. when you’re using it. πŸ˜‰ It’s really frustrating when you’re trying to watch tv, but it’s even more frustrating when you’re developing an app. πŸ˜‰ I tried using an emulator but my pc hardware is officially unsupported now by google’s emulator (missing some instructions). It’s time to replace this 8 year old rig, it served me well.. Anyway, I’m digressing.

As a replacement for the bluetooth LE remote, I started using a Logitech gamepad. Unfortunately, it turned out to not emit DPAD_CENTER events required for adjusting size and position. From now on, gamepads should work just as well (use the “A” button to press “enter”).

Positioning the clock

While I was at it, I added a notice about keeping the button pressed to reposition the clock faster. It seems some people have trouble moving the clock around and complain having to move it a pixel at a time. The input dialogs for repositioning and scaling the clock were originally stubs for a nicer UI but as a lot of things, it just stayed.. Might improve in some future version.

Android 4.0.3+ required

The original plan was to have the clock run on as many devices as possible (also smart phones). So for a long time, the min api level was 10 (Gingerbread or 2.3.3+). I remember having a gingerbread device and often being annoyed by developers bumping the android version too early, effectively abandoning me from a functioning app (due to backend changes). I looked at the app stats and it turns out there are only 3 users below 4.0.3. I apologize, but no new version anymore for them. The bump is due to support lib requirements.

 

Changelog

+ customize clock and outline color
* fix pressing buttons with gamepad
* size and position pref: hint about keeping the button pressed to go faster
* min api level bumped from 10 to 15 (4.0.3) due to support lib requirement
* renamed main activity title because Oreo shows it in the launcher

OnScreenClock v0.4.1

This is a small update before the big changes come in πŸ˜‰

I noticed sometimes the clock disappears due to high system load. Normally, the android system automatically relaunches the service afterwards, but sometimes this does not seem to happen. I’m not sure what’s the cause, but I added a trigger: when the service is destroyed by the system, it sends out a broadcast event just before dying to restart the service. Not sure if it will help..

v0.4.1 2017-11-30
=================
* try restarting service when it is killed by the system to free resources
* fix NPE crash when back button is pressed before webview is fully loaded

Get it on Google Play

OnScreenClock: back to 1 app

When google released Android Marshmallow, they introduced a new permission model. I jumped on the band wagon too eagerly and as a result, the OnScreenClock app had become unusable on Marshmallow and up due to an unimplemented feature on Android TV. Complaining to google did not help.

So I did the only thing I could do: release a new app targeting an older api. This app is known as “OnScreenClock Marshmallow” (a bit of a paradox, i know πŸ˜‰ ). Recently, however, just when I was about to migrate all users of the old app to the new one, I discovered Google has relaxed their policy, so now the “old” app is good to go again! I guess it was causing too much trouble for users everywhere.. This is undocumented so I guess Google wants to keep that change low profile. πŸ˜‰ This also means the future is uncertain, but that’s life, right?

To all users using theΒ “OnScreenClock Marshmallow” app, please migrate to the “OnScreenClock” app as I will not be further developing the “OnScreenClock Marshmallow” app anymore.

Apologies for the inconvience.

OnScreenClock v0.3.3

After a long hiatus, finally an (unfortunately minor) release πŸ™‚ Let’s hope for more in the near future.

Since on Android TV, you never know when an app has been updated, I added an optional notification on upgrade so you know when the app has been upgraded. You can choose how you get notified:

  • Either a web page pops up right after the upgrade (this usually doesn’t bother since apps get updated at night when you don’t use the tv) where you can read up on the changes,
  • Or you get a visual indication in the clock widget. In the latter case, next time you open up the app, you will be presented with the changelog and the indicator disappears.

The latter option is default since it is less obtrusive.

In other news, you can finally change the text clock format to 12-hour notation if you wish so!

v0.3.3 2017-03-09
=================
+ optionally show clock notification after upgrade (default)
+ show D-pad instructions above release notes webpage
* fix 12 hour clock starting at 0

v0.3.2 2017-03-02 (not released)
=================
+ added 12-hour clock format preference
+ optionally show release notes after upgrade