1

I have two applications where the one opens by implicit intentthe other one.So in the first application I create an Intent and where I wrote i.setAction("com.example.secondApp");and I launch it through startActivity(i);

Then on the second app I change the manifest(filter) like:

  <intent-filter>
           <action android:name="com.example.secondApp" />

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

plus I do all the creation intent in the java section.

*code tested because everything was done by explicit intent in the first place and worked fine

So my point is when I try to run them both the first app installs nicely where the second one says that No Launcher activity found!obviously cause I changed it but despite it installs it isn't shown on the phone nor the first App detects the second one,any clue?

*Also when I leave the manifest(filter) of the second app at default values it installs fine.

Phil_Charly
  • 137
  • 13

1 Answers1

1

If you want an activity to appear in the launcher, it needs the appropriate <intent-filter>:

        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>

            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>

If you want that activity to have another <intent-filter>, that is fine. An <activity> can have as many <intent-filter> elements as needed.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thank you very much I didn't know you can put as many filters as you want.I added in my intent-filter your choice too(default) and know it worked fine,thanks a lot. – Phil_Charly Dec 16 '14 at 17:47