문제

I have the follow manifest part about application

<application
    android:allowBackup="true" 
    android:icon="@drawable/icon_goodrider_logo"
    android:label="@string/app_name"
    android:theme="@style/PingTheme" >

    <activity
        android:name=".passenger.ui.LicenseActivity"
        android:label="@string/app_passenger_label" 
        android:icon="@drawable/icon_logo"
        android:taskAffinity="com.city.passenger"            
        android:screenOrientation="portrait">

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

    <activity 
        android:name=".driver.ui.LicenseActivity" 
        android:label="@string/app_driver_label" 
        android:icon="@drawable/icon_logo"
        android:taskAffinity="com.city.driver"            
        android:screenOrientation="portrait">

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

and I want to set launch activity for Google Play Open button (visible after install) or APK install Open button.

Is it possible with out one more launch icon at apps?

Thanks! =)

도움이 되었습니까?

해결책 2

    <activity android:name=".FirstLaunchActivity" android:label="@string/app_name" >

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

다른 팁

From my experience, the Open button after the APK was installed is grayed out (disabled) when there are multiple main activities in your AndroidManifest.xml.

Interestingly enough, it seems that this is only the case for pre-ICS devices. In Ice Cream Sandwich, the Open button is clickable and the first Activity in your AndroidManifest.xml with an android.intent.action.MAIN intent filter will be opened on tap.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top