简体   繁体   中英

Starting EasterEgg intent in Android

how can I start EASTER EGG intent from Android application?

I can start Easter Egg intent using ADB command:

adb shell am start -n android/com.android.internal.app.PlatLogoActivity

but I can't start that intent from my application, any way?

here's my code:

Intent intent = new Intent("android/com.android.internal.app.PlatLogoActivity");
startActivity(intent);

here's the LogCat:

06-20 15:25:54.466: W/System.err(965): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.internal.app.PlatLogoActivity }
06-20 15:25:54.476: W/System.err(965):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1409)
06-20 15:25:54.476: W/System.err(965):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
06-20 15:25:54.476: W/System.err(965):  at android.app.Activity.startActivityForResult(Activity.java:2827)
06-20 15:25:54.476: W/System.err(965):  at android.app.Activity.startActivity(Activity.java:2933)
06-20 15:25:54.476: W/System.err(965):  at awaisking.testapp.itdunya.MainClass$1.onClick(MainClass.java:41)

The correct intent is

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setClassName("android", "com.android.internal.app.PlatLogoActivity");

But even with this, you won't be able to start the activity due to security restrictions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM