2014-01-21 51 views
0

我为我的移动应用程序项目使用worklight。我的问题是如何禁用Android清单中的启动画面?IBM Worklight - 如何禁用启动画面?

这是我的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

非常感谢提前。

+0

你想直接显示com.rmbp.rmbp活动? –

回答

0

移动块:

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

我的错误,请检查我最近编辑过的问题 –

+0

现在我看不到更新的清单中的SplashScreen。它是不是按你想要的方式工作? – Dimmerg

+0

否,因为工作灯仍然加载启动画面。你可以在我的问题中检查我的回购 –

相关问题