这个问题在这里被问了 3 次,但没有答案。
我在 android 设备 2.3.6 (Galaxy SII) 上使用 Phonegap 2.1 我也在使用 AdMob Phonegap 插件。
那么问题与其他人所说的相同:
- 当尝试通过应用程序图标恢复时,即使应用程序在内存中,它也会重新启动
- 通过任务管理器时,它会正常恢复
我的主要活动
public class testApp extends DroidGap
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
setIntegerProperty("loadUrlTimeoutValue", 60000);
super.loadUrl("file:///android_asset/www/index.html",5000);
}
}
清单.xml
<application android:icon="@drawable/icon" android:label="@string/app_name"
>
<activity android:name="testApp" android:label="@string/app_name"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
/>
</application>
谢谢你的任何建议