Jeff Storey
Jeff Storey

Reputation: 57202

Eclipse Android launcher shows home screen, not my application

When I launch my android application from eclipse, it shows the home screen, and I then need to unlock the screen and go to my app. I would like it to just show my app by default.

I have tried right clicking on the app and selecting Run As..., but Android Application is not a choice there. I need to manually create a new Android run configuration for my application and then I launch that.

Is there a way to just make my app show by default? I'm running with the emulator for Android version 2.2?

Note: I'm also getting an error that says "Emulator] Unknown savevm section type 95" which I'm not sure what that means yet

thanks, Jeff

Upvotes: 2

Views: 9299

Answers (3)

Julian Suarez
Julian Suarez

Reputation: 4521

Check your manifest, and make sure your activity has the correct intent-filter

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

BTW, Previous to Android 1.6 i think the emulator always started with the screen locked then they changed that and it starts with your app

Upvotes: 0

Rob
Rob

Reputation: 2779

The emulator always starts with the screen locked. Unlock it and wait a moment, sometimes it needs a minute to launch your app. If it doesn't work after a few moments, leave the emulator open and try running it again. If it doesn't launch now, there's something wrong.

Upvotes: 2

Joishi Bodio
Joishi Bodio

Reputation: 438

I'm thinking you either didn't create your project as an android project to begin with, or if you did you didn't create a starting activity (or deleted the one that you did create)? Either way, you probably need to go edit your AndroidManifest.xml file and add an intent filter to an activity. Just guessing. Should look similar to this:

    <activity
      android:name={String for the name of your app}
      android:label={String for the name displayed on the icon}>
      <intent-filter>
        <action
          android:name="android.intent.action.MAIN"/>
        <category
          android:name="android.intent.category.LAUNCHER"/>
      </intent-filter>
    </activity>

** posted before your edit ^^^

In terms of your error, I have no clue what that is, so maybe it has nothing to do with your AndroidManifest, then. :T

Upvotes: 1

Related Questions