Android Intent - URL

53 views
Skip to first unread message

Edwin Khodabakchian

unread,
Apr 13, 2011, 4:38:30 AM4/13/11
to Friends of the Unofficial Google Reader API
Does anyone know what is the property name which should be used to
pass a URL to the "Note in Reader" intent?
Thanks!
Edwin

Mihai Parparita

unread,
Apr 13, 2011, 1:28:20 PM4/13/11
to foug...@googlegroups.com
Hi Edwin,

Here's what the Android app's developer says:

Yes, Reader just uses the standard "send" Intent.
Here's an example:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, title);
intent.putExtra(Intent.EXTRA_TEXT, url);
intent.setPackage("com.google.android.apps.reader");
try {
 startActivity(intent);
} catch (ActivityNotFoundException e) {
 // Reader is not installed
}

Mihai

Edwin Khodabakchian

unread,
Apr 13, 2011, 5:47:16 PM4/13/11
to Friends of the Unofficial Google Reader API
Thank you. Passing the url as text works. It would be great if in
future updates, it could use a dedicated field (something like
shareIntent.putExtra("com.google.android.reader.URL", url), so that
EXTRA_TEXT could be configured to pass in formatted text to Twitter
and other intents who have the notion of text. -Edwin
Reply all
Reply to author
Forward
0 new messages