Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom Implicit Intent in Android not working
    primarykey
    data
    text
    <p>I am testing implicit intent. I have two Small Test Applications: 1st AndroidManifest.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sudipta.example" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="14" /&gt; &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" &gt; &lt;activity android:label="@string/app_name" android:name="com.sudipta.example.Intent1Activity" &gt; &lt;intent-filter &gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;intent-filter &gt; &lt;action android:name="com.sudipta.personal.TEST" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;data android:mimeType="text/plain"/&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>2nd AndroidManifest.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sudipta.example" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="14" /&gt; &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" &gt; &lt;activity android:label="@string/app_name" android:name=".Intent2Activity" &gt; &lt;intent-filter &gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;intent-filter &gt; &lt;action android:name="com.sudipta.personal.TEST" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;data android:mimeType="text/plain"/&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>Now I am calling the below code:</p> <pre><code>btn1.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { //Call the Implicit Intent Intent intent = new Intent(); intent.setAction("com.sudipta.personal.TEST"); startActivity(intent); } }); </code></pre> <p>Below is the error code I am getting:</p> <pre><code>12-12 15:20:42.963: E/AndroidRuntime(824): FATAL EXCEPTION: main 12-12 15:20:42.963: E/AndroidRuntime(824): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.sudipta.personal.TEST } 12-12 15:20:42.963: E/AndroidRuntime(824): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512) 12-12 15:20:42.963: E/AndroidRuntime(824): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384) 12-12 15:20:42.963: E/AndroidRuntime(824): at android.app.Activity.startActivityForResult(Activity.java:3190) 12-12 15:20:42.963: E/AndroidRuntime(824): at android.app.Activity.startActivity(Activity.java:3297) 12-12 15:20:42.963: E/AndroidRuntime(824): at com.sudipta.example.ImplicitIntentActivity$1.onClick(ImplicitIntentActivity.java:28) 12-12 15:20:42.963: E/AndroidRuntime(824): at android.view.View.performClick(View.java:3460) 12-12 15:20:42.963: E/AndroidRuntime(824): at android.view.View$PerformClick.run(View.java:13955) 12-12 15:20:42.963: E/AndroidRuntime(824): at android.os.Handler.handleCallback(Handler.java:605) 12-12 15:20:42.963: E/AndroidRuntime(824): at android.os.Handler.dispatchMessage(Handler.java:92) 12-12 15:20:42.963: E/AndroidRuntime(824): at android.os.Looper.loop(Looper.java:137) 12-12 15:20:42.963: E/AndroidRuntime(824): at android.app.ActivityThread.main(ActivityThread.java:4340) 12-12 15:20:42.963: E/AndroidRuntime(824): at java.lang.reflect.Method.invokeNative(Native Method) 12-12 15:20:42.963: E/AndroidRuntime(824): at java.lang.reflect.Method.invoke(Method.java:511) 12-12 15:20:42.963: E/AndroidRuntime(824): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 12-12 15:20:42.963: E/AndroidRuntime(824): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 12-12 15:20:42.963: E/AndroidRuntime(824): at dalvik.system.NativeStart.main(Native Method) </code></pre> <p>Could you please let me know what is the issue here? Thanks.</p> <p>Sudipta.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload