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