The in-vehicle Android head unit (which is commonly called Chinese navigation in Japan) is generally used on a horizontal screen, so the area near the center of the status bar is empty. Therefore, I made an app that displays the clock according to the height of the status bar.
In general Android terminals, the OS has a mechanism to automatically start the application triggered by the startup of the terminal, but it turned out that this function does not work well with the in-vehicle head unit. I did. Also, the specifications around here seem to differ depending on the head unit.
Therefore, in this app, the start of accessibility service, which is another function of the OS, can also be used as a trigger for startup.
However, this app alone cannot be automatically started on a head unit that forcibly turns off accessibility services during sleep. (I need the help of another app such as Tasker.)
As you can see, depending on the specifications of the head unit, this app may not start automatically after restarting. Thank you for your understanding.
[How to use]
・ When you start it for the first time, you will be asked if you want to draw on top of other apps, so please allow it. If you do not allow it, this app will not work.
-Turn on the switch on the screen to start the clock display.
・ If the display does not resume even after restarting the terminal and waiting for a while, turn on the accessibility service in (1).
-Restart the terminal and if the accessibility service of (1) is turned off, turn it on again and try setting the battery of (2) not to be optimized.
-If the accessibility service of (1) is still turned off after restarting the terminal and there is no setting on the head unit side that does not kill the task during sleep, unfortunately the head unit you are using is this app alone. Cannot be started automatically.
・ If you can use an external application such as Tasker (assuming that the external application can be started automatically after restarting the terminal)
Package name: com.toshi.barclock
Class name: com.toshi.barclock.RestartActivity
If you send an intent to the Activity, you can start the clock display without going through the initial screen.
(Please refrain from accepting inquiries regarding external applications.)
-The time display originally displayed on the status bar on the OS side may be turned off with the system UI adjustment tool of the hidden function. I have prepared a button that can be called, but it may not work depending on the head unit.
-In the default settings of the OS, an icon is displayed in the notification area when the display starts, and a notification sound sounds at the same time. I also prepared a button to call up the screen for setting notification on / off.
[Head unit whose operation has been checked by us]
-Ownice C960: When the accessibility of ① was turned on and the extension setting on the head unit side was set so that this application would not turn off during sleep, it worked without problems.
-PUMPKIN AE0273B-06A: The accessibility service was turned off during sleep even after setting ①②. It worked when I sent an intent triggered by the screen status on in Tasker.
-Although it works on general Android devices other than the head unit, it has the original time display, so I think this app is not very meaningful.
The source is here.
https://github.com/Toshi2020/BarClock
The date and time are displayed in the center of the status bar at the top of the screen.