How to simulate power off key

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


Sponsored Links
 Hi,
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,
Daddym85.

-- 



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)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

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

-- 


Sponsored Links


Other Threads

1. Developing app to connect with websites

Hello,

I would like to know if it is possible to develop an app that connects
with a website(s) (not mine) and pull info, news, images...etc, and
display them in the app.

Basically, I want to develop an app that provides latest news,
fixtures, match results...etc of a football club which has a website
on the web.

If more details are required, please let me know.

Thanks

-- 

2. detect usb connected/disconnected event

Hi all!

 I had read in a lot of forum it is a problem to developers to write a
program witch can detect the connected / disconnected USB event. Here is my
solution:

Manifest.xml :

        <receiver android:name=".MyReceiver">
            <intent-filter>
                <action android:name="android.intent.action.ums_connected"
/>
            </intent-filter>
        </receiver>

Myreceiver:

public class MyReceiver extends BroadcastReceiver{
if (intent.getAction().equalsIgnoreCase(
        "android.intent.action.UMS_CONNECTED")) {...}
}


bye:Kroly Holczhauser from Hungary

-- 

3. How to investigate the memory leak in jni method?

4. Tanya A50/A10

5. how create a video with byte array

6. App is published in Android Market but not visible in some phones

7. best way to save images files