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;
}
});
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);
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.
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.
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.
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>
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With