I want to make an app that can shut down android ,
this is the method that I get from the Internet,but when I run it in
the emulator,
I get the following Error message:
Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
[2011-05-15 16:32:58 - CCMromoteControl] Please check logcat output
for more details.
[2011-05-15 16:32:58 - CCMromoteControl] Launch canceled!

public class ShutDownAndroid extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
                Intent i = new Intent(Intent.ACTION_REBOOT);
                i.setAction(Intent.ACTION_REBOOT);
        i.putExtra("nowait", 1);
        i.putExtra("interval", 1);
        i.putExtra("window", 0);
        sendBroadcast(i);
}
}

AndroidMainifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
      package="ccm.romote.control"
      android:versionCode="1"
      android:versionName="1.0"
      android:sharedUserId="android.uid.system"
     >
        <uses-permission android:name="android.permission.REBOOT" />
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".ShutDownAndroid"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
                 <uses-permission
android:name="android.permission.REBOOT" />
            </intent-filter>
        </activity>
    </application>
</manifest>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to