0
我正在嘗試使用ACTION_SEND
分享文本和附件。ACTION_SEND:可以過濾接受附件的應用程序嗎?
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"email"});
intent.putExtra(Intent.EXTRA_SUBJECT, "subject");
intent.putExtra(Intent.EXTRA_TEXT, "body");
Uri uri = Uri.fromFile(file);
intent.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(Intent.createChooser(intent, "Send..."));
但是,在列表中顯示的環聊應用程序不接受附件。
我可以過濾不接受附件的應用嗎?是否有標籤或其他指標可以告訴我應用程序是否接受附件?
檢查:http://stackoverflow.com/questions/20015410/customize-android-intent-action-send – 2014-10-20 11:26:32
@HareshChhelana這是真正不可靠的包過濾。我已經找到這篇文章。 – sandalone 2014-10-20 11:32:58