• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Lots of Power Behavior Questions

I’m developing a new product that’s based on an Android tablet and goes inside a truck or automobile. The general idea is that the device is like a kiosk. The screen is instantly on when the ignition is on, and off when the ignition is off. There’s no access to the tablet power button. Meanwhile, the tablet is a USB OTG host to a custom external peripheral. The situation currently seems that making an Android tablet behave like this is very difficult. Your comments on the items below and your general assistance in figuring this out is greatly appreciated. For testing I’m using a TECLAST P80H.

TURN ON: The tablet needs to turn on instantly when the vehicle ignition is turned on. While the tablet does turn on instantly when a regular USB cable is plugged between it and a powering host, the tablet does NOT turn on when a USB OTG cable is plugged into it. I believe this is because the USB OTG cable informs the tablet to behave as a host, providing power to the cable rather than consuming power from it. Since the tablet is providing power, it seems to not think it needs to power on like it does when it’s consuming power.

STAY ON: The tablet needs to stay on as long as the ignition remains on, rather than time out due to inactivity and power off. I’ve found the Stay awake setting in the developer options, which should only apply while charging. But in USB OTG host mode, it’s not charging. I found and implemented some other setting in the past, that even works to totally discharge the battery, but I can’t find my notes for that.

TURN OFF: The tablet needs to run off when the vehicle ignition is turned off. I haven’t figured out how to make this happen easily. My best guess is to root the phone and make the program do a shutdown, which may or may not work with this specific device. Then, the program needs external hardware help to determine if the ignition is off, which I think I can provide from the custom peripheral. (It does occur to me now that I could use the custom peripheral for the TURN ON feature as well. That is, monkey with the USB ID line so that, on initial power on, the custom peripheral makes the cable look like a regular USB cable to charge the tablet. This makes the tablet turn on. After a very short timer, the custom peripheral switches the USB ID line to make it look like a USB OTG cable.)

ACA-DOCK MODE: There is a little used, relatively new USB specification for “Accessory Charging Adapter”, where the tablet would simultaneously be a USB OTG host while also receiving power from the USB cable and thus charging. This might solve a bunch of problems. However, it appears that most Android tablets are *not* ACA-Dock compatible, which in essence increases the likely cost per unit on the tablet. Furthermore, it would require my custom peripheral to have an ACA-Dock compatible USB hub inside of it, thus further increasing cost.

INSTANT ON: If I removed the battery connections from inside the tablet, then it would definitely turn off when external power was removed. I haven’t specifically tested it yet, but I believe this also means that it would *not* turn on instantly. The underlying operating system would have to boot, which takes too long for my application. (I will go test this to be absolutely certain, but I’m pretty sure. A dead-battery test showed it takes forever to get the battery up enough to turn on, so what with no battery at all? Furthermore, that dead-battery test put the tablet in a mode that it never turned on again without pressing the power button.

BATTERY CHARGING: Is it the case that the INSTANT ON feature of the Android tablet is made possible by the battery? That is, is the tablet in some kind of sleep mode that requires the power of the battery to be present? Or is that mode preserved by non-volatile memory? I’m concerned that I must also maintain the battery. I’ve thought about intercepting the tablet’s Li ion battery wires and inserting wires from my custom peripheral (physically adjacent). These wires would connect to a battery charger and power supply/regulator in the peripheral. Or I might be able to intercept some wires on the tablet’s own battery charger and power supply/regulator.
 
Maybe if you programmed the tablet to go into sleep mode whenever not charging and connected the charger to one of those circular power outlets in the car, so that when the car is turned on it would begin to charge the tablet and turn it on. This could be done by editing whatever script tells the system to go into sleep mode and making it detect if it's charging and put the system into sleep mode, if not.
 
Upvote 0
Maybe if you programmed the tablet to go into sleep mode whenever not charging and connected the charger to one of those circular power outlets in the car, so that when the car is turned on it would begin to charge the tablet and turn it on. This could be done by editing whatever script tells the system to go into sleep mode and making it detect if it's charging and put the system into sleep mode, if not.

Good thought. However, when in USB OTG mode, it's *not* charging.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones