簡體   English   中英

IBM Worklight-如何禁用啟動屏幕?

[英]IBM Worklight - How to disable splash screen?

我正在為我的移動應用程序項目使用worklight。 我的問題是如何在Android清單中禁用啟動屏幕?

這是我的android清單。

<?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>

檢查我的倉庫: https : //github.com/datomnurdin/worklight-mobile

非常感謝。

移動此塊:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM