February 12th, 2012, 03:39 PM
|
#2 (permalink)
|
|
Premium Member
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
Device(s): Galaxy Nexus GSM
Thanks: 2
Thanked 37 Times in 33 Posts
|
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>
|
|
|
Last edited by jiminaus; February 12th, 2012 at 03:52 PM.
Reason: Re-worked the post.
|
|