Question

I was trying to create an intent in Android that would search in the Evernote app for a specific keyword, but the documentation that the Evernote site mentions doesn't seem to be available, so I tried writing it on my own, but it doesn't seem to work. This is what I have now:

final String ACTION_EVERNOTE = "com.evernote.action.SEARCH_NOTES";
String KEYWORD = "hoi";
Intent i = new Intent();
i.setAction(ACTION_EVERNOTE);
i.putExtra(Intent.ACTION_SEARCH, KEYWORD);
startActivity(i);

Does anyone have an idea what is going wrong here? Right now it just performs a search with an asterisk, which is the default, so it probably just ignores the ACTION_SEARCH part. Is there an error in that part of my intent?

Thanks in advance!

Was it helpful?

Solution

Try it like this, with the String called QUERY, as it's called in the SearchManager documentation:

final String ACTION_EVERNOTE = "com.evernote.action.SEARCH_NOTES";
String QUERY = "hoi";
Intent i = new Intent();
i.setAction(ACTION_EVERNOTE);
i.putExtra(Intent.ACTION_SEARCH, QUERY);
startActivity(i);

OTHER TIPS

An addition to the answer above. There is a new tiny library to send these Intents to the Evernote core app.

https://github.com/evernote/android-intent

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top