How to boot android phone programmatically?

后端 未结 4 1104
庸人自扰
庸人自扰 2021-01-03 14:28

I want to reboot targeted phone by SMS. Is it possible? How can we implement this?

相关标签:
4条回答
  • 2021-01-03 15:05

    If you mean by having an app waiting for a specific text, then only on a rooted phone.

    Ranhiru's link tells you how to get the text without it giving a text notification. If your phone isn't rooted, then programs don't have access to functions like that. If it's rooted, I can't say exactly how to do it, I haven't tried yet, but have a look for the source of apps like quickboot, a lot of them have it all publically available on code.google.com

    0 讨论(0)
  • 2021-01-03 15:07

    For the record, it IS possible to intercept SMS messages on a stock Android phone - I've written a little app which pops up a Toast when I get a text rather than having to go in to the messages app.

    It's NOT possible to perform a normal shutdown/reboot/??? without rooting the phone or being Google (at least, convinving the phone you're Google) but that would be a violation of the developer agreement.

    In fact, you will find huge barriers in your way if you try to do anything to the OS or any other app - Which is usually a good thing

    0 讨论(0)
  • 2021-01-03 15:27

    Your problem has two core parts. Can you reboot the phone programatically? Can you write a program to intercept incoming SMS? If you answered YES to both of your question, it is possible to do this.

    I am not a Android developer but i think this should be quite possible.

    take a look @ Android SMS intercept without notification icon or WAP-PUSH messages and http://mobiforge.com/developing/story/sms-messaging-android

    I think BroadcastReceiver is the one you are looking for.

    I have no idea whether you can programatically reset the android phone using java... Someone else might answer you about that

    EDIT: I guess according to the link Bill has posted, 3rd party applications are not permitted to do a reset

    0 讨论(0)
  • 2021-01-03 15:29

    According to this Android Developers thread on Google Groups, third party applications don't have permission to reboot the device.

    0 讨论(0)
提交回复
热议问题