Implicit intention not called

I am trying to use the Implicit intention to start activity in one application and for activity of another application (another application, not my own), but cannot succeed in any of the cases.

Here is my sample code for the first part (i.e. starting an activity in one application):

TESTActivity internal activity

Intent intent = new Intent();
intent.setAction("com.myapp.game.myimplicit_action");
startActivity(intent);

and here is my declarative file declaration for some activity, say, "ImplicitActivity" with the same action:

<activity
   android:name=".TESTActivity"
   android:label="@string/app_name" >
   <intent-filter>
   <action android:name="android.intent.action.MAIN" />
   <category android:name="android.intent.category.LAUNCHER" />
   </intent-filter>
</activity>

<activity  android:name=".ImplicitActivity">
   <intent-filter>
   <action android:name="com.myapp.test.myimplicit_action" />
   </intent-filter>
</activity>

Both actions TESTActivityand ImplicitActivityare in one app in one package. However, my activity is ImplicitActivitynot caused.

+5
source share
1 answer

. , .

, Implicit. , :

<activity
   android:name=".TESTActivity"
   android:label="@string/app_name" >
   <intent-filter>
   <action android:name="android.intent.action.MAIN" />
   <category android:name="android.intent.category.LAUNCHER" />
   </intent-filter>
</activity>

<activity  android:name=".ImplicitActivity">
   <intent-filter>
   <action android:name="com.myapp.test.myimplicit_action" />
   <category android:name="android.intent.category.DEFAULT" />
   </intent-filter>
</activity>
+12

All Articles