1

I am trying to develop a kiosk application on android. I am facing two challenges.


  1. Once the tablet getting off due to a battery drain. it is not turning on even after the battery reached 100% . is there a work around for this ? I have seen regarding editing some files in /system/init of Android after rooting. But I have not seen any file related to battery or charging. I am using 4.1 and higher

  1. I am experiencing a problem of battery draining. as it continuously keep display on, battery drains gradually even if the charger is connected.

Has anybody came across similar problems and find any solutions ?

Is there android devices available which , power on automatically after connecting wall charger ? Is there tablets that doesn't have battery and directly works from charger connection ?

Please provide your suggestions.

Update 1:


As I am using kiosk operation, I have to keep the screen on every time. I am not experiencing a quick battery drain, it drains slowly even if the charger connected , like 1 percentage in 6-8 minutes, so it lasts approximately 10 hours with charger connected. Then once it gets switched off, it needs to be powered on manually ( not power on after battery drain is a normal behavior, but is there a work around for this ?).

Actually I am not expecting the battery to get drained on a charger connected. is that a normal behavior ?

Can I do anything from the software to prevent it ? When I analyzed most of the power is consumed by screen, then wifi, then comes the application. Both are switched on all the time. Any advises on this ???

Update 2:


<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="in.aivknowtech.reviews.permission.C2D_MESSAGE"/>
 android:permission="android.permission.BIND_DEVICE_ADMIN"

Update 4


As my issue is considered. It is not an issue triggered by a particular event. I assume when connecting a charger android is loading the kernel and only showing a battery symbol, When we press on power button it boots up the kernel. Is there a way to bypass it ? Or is it depended on hardware or firmware ?

If it is dependent on android, Yes there is some hack we can do about it. Else it might be not possible. :(

A similar discussion is here but no definite answer android auto boot on external power

6
  • 1
    Sounds like your charger is too low-powered for the device, or the device is running some abnormally intensive task in the background.
    – Huey
    Aug 4, 2015 at 11:54
  • @Huey, I have tested on two devices, both behaves similarly, is that because of the chargers are not made with enough current capacity ? (are they made in charge only when the screen is switched off ?) Aug 4, 2015 at 12:43
  • What's the current supplied by your charger. Since it's a tablet you'll probably need >= 1.5A ideally
    – Huey
    Aug 4, 2015 at 12:59
  • Currently the supplied charger (7" tab) 5V and 1A usb charger. Aug 4, 2015 at 13:54
  • @Huey,I am seeing a progress now. I connected a 2A charger instead of 1A. Now the battery is getting charged instead of slowly draining. Seems like this will be enough. I am doing further tests , will update you. Aug 5, 2015 at 5:11

1 Answer 1

2

@aivknow tech

I did this on Samsung Galaxy Tab sm-t330nu

edit the lpm service entry in init.rc from

service lpm /system/bin/lpm
    class charger
    critical

to

service lpm /system/bin/reboot
    class charger
    critical

Result = from powered off state, plug in charger, battery icon displays briefly, then device reboots to normal operation.

to mod your device's service in your init.rc in the

on charger

section find that equivalent service.

11
  • Hi , I am not using custom kernel, I have updated the question to depict the scenario well. application is using hardly 10%-15% CPU max and most of the time it is not having any processing in the background. Aug 4, 2015 at 12:46
  • @aivknow tech , hmm what permissions does you app have? is it running in foreground when the issue occurs? Is this issue originating from the device or from the device while running the application?
    – moonbutt74
    Aug 4, 2015 at 13:41
  • It is having admin policy permissions also. please see the update given. Aug 4, 2015 at 13:55
  • This is for locking the device when power is not connected. Yes my application runs all the time on the device. there is not other foreground application. Aug 4, 2015 at 14:02
  • 1
    Thanks for your your answers. I think daydream might not make much difference. please see more thoughts on the Edit. Aug 5, 2015 at 5:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .