How to simulate power off key

by Daddym85 » Tue, 28 Dec 2010 01:16:55 GMT

Sponsored Links
I have a Samsung Galaxy S with  Android 2.2. In order to power off the
phone, I must press and hold the  power off key. I would like to
simulate this action from a Java code. Can I do it?
Best regards,


Re: How to simulate power off key

by Mark Murphy » Tue, 28 Dec 2010 01:29:08 GMT

 Only if you modify the firmware, or possibly root your phone. Normal
SDK applications cannot power off the phone.

Mark Murphy (a Commons Guy)  |  | 

Warescription: Three Android Books, Plus Updates, One Low Price!


Sponsored Links

Other Threads

1. Beta tester wanted for OCR application

Hi all,

My Small OCR application is ready to be beta tested.   For now it can
(hopefully correctly) recognize
and dial phone numbers in dark letters against light backgrounds.

It utulises open source OCR library:

Signed APK can be downloaded from:

I'm interested in reports from various devices and android versions.
Please include ADB logs
filtered by "ocrcall" in problem reports



2. WTH: market, gmail & gtalk gak ada

Selamat pagi para suhu semua ....
Mohon pencerahan, setelah update 2.2.1 ke 2.3.2
market,gtalk,Gmail,maps,etc tidak ada/hilang. Sebelumnya sudah backup
pake titanium,tapi  setelah update ternyata tidak terbackup.
Kemudian dapet apk market,gtalk dan Gmail tapi setelah install tidak
Mau jalan.
Mohon pencerahan bagaimana memunculkan lagi aplikasi2 tsb,
Terima kasih...

Aziz wj

Sent from nexus one


3. "" Correction

4. motorola pun bingung

5. Perkenalkan diriku dari surabaya

6. how to find name of all weekdays with their date

7. Error while invoking hardware decoder from JNI