mercredi 4 mars 2015

Launching an Activity within an installed package from Android Application



I'm trying to open Google Now on a button click in my Android Application but I can't figure out what's wrong with my code. I run this on a button click event.



Intent intent = new Intent("android.intent.action.MAIN");
intent.setComponent(ComponentName.unflattenFromString("com.google.android.googlequicksearchbox/com.google.android.search.core.google.GoogleSearch"));
intent.addCategory("android.intent.category.LAUNCHER");
startActivity(intent);



Aucun commentaire:

Enregistrer un commentaire