我在应用程序中有两个活动,一个是登录活动,另一个是菜单活动,点击登录活动后调用AsyncTask中服务器的服务调用,此处进度对话框旋转....最小化应用程序。现在app转移到后台。
完成服务调用后,onPost方法启动菜单活动。这里的代码是用于凝视菜单活动
Intent intent = new Intent(getApplicationContext(),MenuActivity.class); startActivity(意向);
但现在应用程序出现在前台并显示菜单活动。
当活动在后台开始时,我不希望应用程序来到Foreground。任何人都可以知道哪里出错了,请建议我..
清单文件代码:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.infinisource.iSolved_hcm_mobile"
android:versionCode="9"
android:versionName="7.0">
<uses-sdk android:minSdkVersion="17"/>
<!-- Internet Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Network State Permissions -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Wifi State Permissions -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<!-- Access location permissions-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<permission
android:name="com.infinisource.iSolved.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.infinisource.iSolved.permission.C2D_MESSAGE" />
<application
android:name=".AppData"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@style/iSolvedTheme"
android:icon="@drawable/launcher_icon">
<activity android:name=".LoginActivity"
android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
android:label="@string/app_name"
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=".MenuActivity"
android:screenOrientation="portrait"
android:configChanges="orientation|screenSize|keyboard|keyboardHidden"/>
</application>
</manifest>