开发者

Only specific apps for action.send

i want to send link from my app. 开发者_运维问答I use the following code:

intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
intent.putExtra(Intent.EXTRA_TEXT, text);
startActivity(Intent.createChooser(intent, "Share"));

This brings up a dialog with some Apps. But now I would like to filter this list, i.e. I would like to remove the Blutooth app.

How can i remove apps from this dialog?


You cannot "remove apps from this dialog" directly.

You are welcome to use PackageManager and queryIntentActivities() and present your own custom dialog of stuff. However, you will not be able to reliably identify "the Bluetooth app", since extent there is anything that might qualify on a given device, it may have different names based upon device manufacturer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜