自动开机在Android上连接充电器时, [英] Auto Power on Android when the charger is Connected

查看:2502
本文介绍了自动开机在Android上连接充电器时,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个Android应用程序,其中它不断地需要保持在App了一个运行在所有的时间。与连接到在所有的时间电源插座的电话,是否有可能,如果手机的手机没电为自动启动,无须用户干预的应用程序。 *的即自动开机了电话,没有击中任何电源按钮和启动机器人,因为充电器的连接。 * 然后开始了我与android.intent.action.BOOT_COMPLETED和RECEIVE_BOOT_COMPLETED权限的应用程序

I'm Developing an Android Application where it's constantly required to keep the App up an running at all time. with the phone connected to a power outlet at all time, Is it possible that if the phone's battery died to Auto-start up the app with no user intervention . *i.e to power up the phone automatically without hitting any power button and start up android since charger is connected. * then start up my app with android.intent.action.BOOT_COMPLETED and RECEIVE_BOOT_COMPLETED permission

PS:我曾尝试android.intent.action.ACTION_POWER_CONNECTED,但仅当手机已经开机工作

PS: I have tried android.intent.action.ACTION_POWER_CONNECTED but it only works if the phone is already powered up.

推荐答案

我有完全一样的要求,因为你的。

I have exactly same requirement as yours.

我们可以设计一个解决方案是这样的:

Can we plan a solution like this:

Android设备始终连接到充电器的输出。 充电器的电源连接,其控制电源到充电器一个定制的硬件设备。 该硬件设备把充电器关闭,直到电池电量变低。即20%的剩余。 一旦电池是小于20%,则该设备自动切换上的充电器。 而定制硬件通过USB /无线得到它从Android设备本身的输入/蓝牙。

The Android device is always connected to charger's output. Charger's power supply is connected to a custom made hardware device which controls power supply to charger. This hardware device puts charger off until battery is getting low. i.e. 20% remaining. Once battery is less than 20%, that device automatically switch on the charger. The "custom made hardware" gets it input from android device itself via USB/WiFi/Bluetooth.

只是一个想法。可能没有实际可行的。

Just a thought. May not be practically possible.

这篇关于自动开机在Android上连接充电器时,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆