android - All apps associated with this action have been disabled, blocked, or are not installed Storage Access Framework -
in application trying ms-word , pdf files through storage access framework works on devices i've tested upon on samsung note 4 api 6 getting error
all apps associated action have been disabled, blocked, or not installed
code:
warantybutton.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { intent intent = new intent(intent.action_get_content); intent.addcategory(intent.category_openable); intent.settype("application/pdf,application/msword"); intent = intent.createchooser(intent, "file"); getactivity().startactivityforresult(i, file_req_code); } });
since settype()
method of intent takes 1 argument string i.e mime type
, compulsary because based on mime type
requested android system finds actions supported.
for example if want choose type of content can write settype("*/*")
.
Comments
Post a Comment