• Register
0 votes
135 views

Problem :

In my current application I want to get the MS-Word and PDF files through the Storage Access Framework which works well on some of the devices I have worked upon however on the Samsung note 4 API 6 I am facing following error :

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

Please find below my Code:

Button.setOnClickListener(new View.OnClickListener() {
@Override 
public void onClickButton(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);
}
});
6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I had personally faced similar error while using the Intents. I had received the same error when I was attempting to declare an Intent globally. Please find below example :

public class MyTestClass{
// Class Variables in (BAD)
private Intent someTestActivity = new Intent(this, SomeTestClass.class);
@Override 
protected void onTestCreate(Bundle savedTestInstanceState){
        // Some Code below
    }
}

Then, I discovered that this issue was fixed when I made following change:

public class MyTestClass{
// Class Variables in (Not Bad)
private Intent someTestActivity;
@Override
protected void onTestCreate(Bundle savedTestInstanceState){
someTestActivity = new Intent(this, SomeTestClass.class);
    }
} 

There was no trace of this as an "error." I guess it is more of an OS-handled exception for incorrect usage of Intents.

9 7 4
38,600 points

Related questions

0 votes
1 answer 60 views
60 views
Problem: I have recently started understanding Android Programming. I have some doubts about Androids compatibility. I am trying to understand whether my Android provides some sort of the compatibility I want to say either is it forward or backward compatible. Just like in Blackberry if I ... the Android SDK 1.5 then will that app properly work on any of the handsets having the OS 1.5 or higher.
asked Jul 13, 2020 Raphael Pacheco 4.9k points
0 votes
2 answers 21 views
21 views
Problem: Android obesity is associated with a higher incidence of all the following except A) heart disease. B) diabetes mellitus. C) hypertension. D) cancer.
asked Apr 12, 2020 ArifulIslam 5.6k points
0 votes
1 answer 186 views
186 views
Problem : I want to run the Eclipse JSF project on the Apache Tomcat on some other computer. I created the WAR file. But, when I try to deploy the WAR and open my Facelet page in Firefox, I usually face only the below error message: “This XML file does not appear ... first time when I am trying to run the JSF app without my Eclipse. How is this issue popping up and how can I fix the issue?
asked Jan 3, 2020 alecxe 7.5k points
0 votes
2 answers 124 views
124 views
Problem : I wanted to create a custom dialog by displaying the Activity as the dialog instead of using a Dialog APIs. By creating an activity and seting its theme to the Theme.Holo.Dialog in my <activity> manifest element: <activity android:theme="@android:style/Theme ... was something I wanted to do, because I have already completed my layout. Can somebody tell me how I can resolve this problem?
asked Jan 28, 2020 jwilliam 3.9k points
0 votes
1 answer 8.2K views
8.2K views
Problem : When going to one of the Facebook page: I face the below message: This page isn't available The link you followed may be broken, or the page may have been removed I seriously want to claim the name of that page for my facebook page, but I don't know what a message means, or if I can even claim the page?
asked Feb 3, 2020 jwilliam 3.9k points
0 votes
1 answer 242 views
242 views
Problem: I am very new to php, mongodb and codeigniter. At this moment I am trying to connect the mongodb with the php codeigniter framework. I have already made changes in &ldquo;php.in file extension=php_mongodb.dll.&rdquo; I have also put that file in xampp/php/ext/ ... to MongoDB? Please Note: Currently I am using the php 7, xampp and mongo db is installed in my machine the 3.4 version.
asked Sep 3, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 1.5K views
1.5K views
Problem : I am trying to learn the Android and Ionic. If I run the ionic build android command in the root of the ionic project, I am facing below error: FAILURE: Build failed with an exception. Where: Script '/home/javad/Desktop/javadApp/platforms/android/CordovaLib/cordova. ... Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
asked Feb 18, 2020 mphil 2.3k points
0 votes
2 answers 67 views
67 views
Problem : I have already replaced every occurrence of a compile by implementation in the project's build.gradle, but I am still facing below warning : &ldquo;Warning: configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'&rdquo; I also tried to look for a "compile" in a whole project but no match was found. So what is the cause of the warning?
asked Jan 30, 2020 jwilliam 3.9k points