Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: No Activity found to handle Intent error? How it will resolve

No Activity found to handle Intent error? How it will resolve.

Preference customPref = (Preference) findPreference("DataEntryScreen"); 
   customPref
        .setOnPreferenceClickListener(new OnPreferenceClickListener() {
         public boolean onPreferenceClick(Preference preference) {                  

        Intent i = new Intent("com.scytec.datamobile.vd.gui.android.AppPreferenceActivity");
                 startActivity(i);
                  return true;                                        
               }
           });
like image 462
Ahmad Arslan Avatar asked Feb 06 '12 08:02

Ahmad Arslan


People also ask

How do you pass an activity in intent?

The easiest way to do this would be to pass the session id to the signout activity in the Intent you're using to start the activity: Intent intent = new Intent(getBaseContext(), SignoutActivity. class); intent. putExtra("EXTRA_SESSION_ID", sessionId); startActivity(intent);

Could not open URL no activity found to handle intent?

You see no activity found to handle intent when you attempt to launch an intent either to open a link or to access an app component. It's an error message that is caused because the device is not an official android, Google Play is not supported, or it's a rooted device.

What triggers an intent in android?

Android Intent is the message that is passed between components such as activities, content providers, broadcast receivers, services etc. It is generally used with startActivity() method to invoke activity, broadcast receivers etc. The dictionary meaning of intent is intention or purpose.

What is android intent action view?

An intent allows you to start an activity in another app by describing a simple action you'd like to perform (such as "view a map" or "take a picture") in an Intent object.


2 Answers

Add the below to your manifest:

  <activity   android:name=".AppPreferenceActivity" android:label="@string/app_name">        <intent-filter>         <action android:name="com.scytec.datamobile.vd.gui.android.AppPreferenceActivity" />          <category android:name="android.intent.category.DEFAULT" />        </intent-filter>      </activity> 
like image 124
Karthik Avatar answered Oct 07 '22 13:10

Karthik


in my case, i was sure that the action is correct, but i was passing wrong URL, i passed the website link without the http:// in it's beginning, so it caused the same issue, here is my manifest (part of it)

<activity
        android:name=".MyBrowser"
        android:label="MyBrowser Activity" >
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <action android:name="com.dsociety.activities.MyBrowser" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:scheme="http" />
        </intent-filter>
    </activity>

when i code the following, the same Exception is thrown at run time :

Intent intent = new Intent();
intent.setAction("com.dsociety.activities.MyBrowser");
intent.setData(Uri.parse("www.google.com"));    // should be http://www.google.com
startActivity(intent);
like image 39
Ahmed Adel Ismail Avatar answered Oct 07 '22 11:10

Ahmed Adel Ismail