View Single Post
Old February 12th, 2012, 03:39 PM   #2 (permalink)
jiminaus
Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 191
 
Device(s): Galaxy Nexus GSM
Carrier: Not Provided

Thanks: 2
Thanked 37 Times in 33 Posts
Default

If you actually have android:name=".yourclassname.java" in your AndroidManifest.xml, that will be the problem.

But instead of fixed that, I think you have a more fundamental structural problem in your AndroidManifest.xml.

You want the same activity to start in both cases right? Then you just have one acitivity with multiple sets of intent-filters.

Move the stuff between <intent-filter> ... </intent-fitler> to inside the activity with the MAIN and LAUNCHER intent-filter.

For example:
Code:
<activity
    android:label="@string/app_name"
    android:name=".MyLauncherHomeActivity" >

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

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

</activity>
jiminaus is offline  
Last edited by jiminaus; February 12th, 2012 at 03:52 PM. Reason: Re-worked the post.
Reply With Quote
The Following 2 Users Say Thank You to jiminaus For This Useful Post:
alostpacket (February 12th, 2012), powerpoint45 (February 12th, 2012)