How to shut down phone from within an Application?

by TonyDoc » Sat, 27 Feb 2010 06:20:57 GMT


Sponsored Links
 Is there anyway I can shut down the phone from my app without the need
for user confirmation?

--



Other Threads

1. [ NotifyDataSetChanged / requery ] some question about it in a custom SimpleCursorAdapter.

Hi,

I have some questions about NotifyDataSetChanged() / requery() :

So,
I have a ListView with a custom SimpleCursorAdapter. Everything works
fine but when i go to another Intent by the OnItemClick() i got an
error  because it says that my Cursor in my getView() method is NULL.
i found that requery() does a refresh but it is now deprecated... but
here the doc says : "Performs the query that created the cursor again,
refreshing its contents."

First question :
- If I must perform the query AGAIN (because you get your cursor by
the DBAdapter before calling the constructor), why should the
constructor of the adapter get a Cursor ???

I found that NotifyDataSetChanged() should do the same things, and
have to be called in an event in the adapter, true ? But in my
project, i define my event in my ListActivity and not in the adapter.
Should i change it ?

I hope my english is not too bad, tell me if i have to explain
something a bit more !

Ty,

-- 

2. Print to serial port

I would like to print a string via the serial port in an Android
application.

This works fine using printf() in a regular Linux application written
in C, but I haven't been able to figure out how to do it from an
Android application written in Java.

I can also do it from a shell using something like "echo testString > /
dev/ttyS2".

The reason I would like to do this is for debugging purposes, so that
I don't need to have Eclipse open to look at the logCat file, or
similar methods.

Thank you for any input.

David

-- 

3. Usb host mode driver issue

4. Market package name on Xoom?

5. On emulator an Activity style with backgroundDimEnabled also dims GLSurfaceView output

6. Context differences

7. Jquery Mobile - Php - App Native