Question

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! =)

Était-ce utile?

La solution 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>

Autres conseils

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top