All apps associated with this action have been disabled, blocked, or are not installed Storage Access Framework

Mehvish Ali picture Mehvish Ali · Apr 7, 2017 · Viewed 10.5k times · Source

In my application I am trying to get MS-Word and PDF files through Storage Access Framework which works well on some devices I've tested upon but on Samsung note 4 API 6 I am getting an error

All apps associated with this action have been disabled, blocked, or are 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 i = Intent.createChooser(intent, "File");
                getActivity().startActivityForResult(i, FILE_REQ_CODE);

            }
        });

Answer

user5803705 picture user5803705 · Jul 20, 2017

I'm not sure if this is directly related to your issue, but it is related to an issue I personally had with this error when using Intents (Incorrectly). I have received this error when attempting to declare an Intent globally. For example:

public class MyClass{

// Class Variables (BAD)
private Intent someActivity = new Intent(this, SomeClass.class);

    @Override
    protected void onCreate(Bundle savedInstanceState){
        // Some Code
    }

}

Then, I found that this issue was resolved when I did this:

public class MyClass{

// Class Variables (Not Bad)
private Intent someActivity;

    @Override
    protected void onCreate(Bundle savedInstanceState){
        someActivity = new Intent(this, SomeClass.class);
    }

} 

If this doesn't help you in your specific situation, I hope this helps someone at some point.

When debugging to find the reason behind this problem, I couldn't see any note of the Toast that generated the text "All apps associated with this action have been disabled, blocked, or are not installed." There was no trace of this being an "error." It seems to me more of an OS-handled exception for incorrect usage of Intents.