0
votes

I'm using worklight for my mobile app project. My question is how to disable splash screen in android manifest?

This is my android manifest.

<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.rmbp"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="9"
        android:targetSdkVersion="18" />

    <supports-screens
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <!-- Push permissions -->
    <permission
        android:name="com.rmbp.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.rmbp.permission.C2D_MESSAGE" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:debuggable="true"
        android:icon="@drawable/icon"
        android:label="@string/app_name" >
        <activity
            android:name="com.rmbp.rmbp"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/app_name"
            android:launchMode="singleTask"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.rmbp.rmbp.NOTIFICATION" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <!-- Preference Activity -->
        <activity
            android:name="com.worklight.common.WLPreferences"
            android:label="Worklight Settings" >
        </activity>
        <!-- Push service -->
        <!--
             In order to use the c2dm library, an application must declare a class with the name C2DMReceiver, in its own package, extending com.google.android.c2dm.C2DMBaseReceiver 
            It must also include this section in the manifest, replacing "com.google.android.apps.chrometophone" with its package name.
        -->
        <service android:name="com.rmbp.GCMIntentService" />
        <service android:name="com.rmbp.ForegroundService" />
        <!-- Only google service can send data messages for the app. If permission is not set - any other app can generate it -->
        <receiver
            android:name="com.google.android.gcm.GCMBroadcastReceiver"
            android:permission="com.google.android.c2dm.permission.SEND" >

            <!-- Receive the actual message -->
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />

                <category android:name="com.rmbp" />
            </intent-filter>
            <!-- Receive the registration id -->
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

                <category android:name="com.rmbp" />
            </intent-filter>
        </receiver>
    </application>
</manifest>

Check my repo: https://github.com/datomnurdin/worklight-mobile

Thanks a lot in advance.

1
Do you want to show com.rmbp.rmbp Activity directly?ravindra.kamble

1 Answers

0
votes

Move this block:

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

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
            <action android:name="com.rmbp.rmbp.NOTIFICATION" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>

to the activity which you want to start first. Intent filter will mark this activity as default for start from launcher.

For example:

<activity
        android:name="com.rmbp.SplashScreen"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:label="@string/title_activity_splash_screen"
        android:launchMode="singleTask"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.rmbp.rmbp"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
            <action android:name="com.rmbp.rmbp.NOTIFICATION" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>