开发者

Double installation of apk

I have an app that i am working on. but when i run it through the eclipse avd... It shows t开发者_运维知识库wo icons in the app screen. any ideas what is going on?

Also I used the apk to install on my phone and i also saw two installation of the same app on my phone.


you have to set a one Launcher activity in your manifest. that is

you set it as:

<activity android:name=".Activity1" android:label="@string/appname">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".Activity2" android:label="@string/appname">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

you have to put the <category android:name="android.intent.category.DEFAULT" /> instead of <category android:name="android.intent.category.LAUNCHER" /> for your the activity you dont want to launch.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜