Android:Intent:Filter
lastmod 2014-02-26created 2014-02-263 edits
Caveats when passing Intent messages using a URL Scheme
When passing URI information with an Android Intent, be careful: if you use Intent.setType(), the call will not work properly.
Uri uri = Uri.parse("zekiplay://upload?ver=1&uri=test");
Intent intent = new Intent(Intent.ACTION_SEND, uri);
intent.addCategory(Intent.CATEGORY_BROWSABLE);
// intent.setType("image/jpeg"); // DELETE!!!
startActivity(intent);
Conversely, when using the Android OS share feature, you can use it freely.
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, "Subject");
intent.putExtra(Intent.EXTRA_TEXT, "Text");