PhoneGap Androidアプリを完全に閉じるにはどうすればいいですか?私はnavigator.app.exitApp()と同様にdevice.exitApp()を使って試してみたが、両方とも同じ問題がある。phonegap android appを完全に閉じる
問題は、外部のhtmlファイルmain.htmlにリンクするhtmlファイルindex.htmlがあることです。今私は外部ファイルに行くことなく閉じるボタンを押すと、アプリはうまく閉じます。私が外部ファイルに行き、次に索引に戻ってから閉じると、索引は閉じますが、主索引が表示されます。外部ページに行ってもいなくても、アプリを完全に閉じるにはどうしたらいいですか?
Index.htmlと
<html>
<head>
<script type="text/javascript" src="Scripts/phonegap-1.0.0.js"></script>
</head>
<body>
<a href="index.html">Index</a>
</body>
</html>
main.htmlを
<html>
<head>
<script type="text/javascript" src="Scripts/phonegap-1.0.0.js"></script>
</head>
<body>
<a href="index.html">Index</a>
</body>
</html>
Androidのマニフェスト
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".TestActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.phonegap.DroidGap"
android:label="@string/app_name" android:configChanges="orientation|keyboardHidden">
</activity>
</application>
これはアンドロイドの仕組みではありません。あなたはおそらくあなたの活動の2番目のインスタンスを開いているでしょう。 – Falmarri
どういう意味ですか?私が持っている唯一の活動は、デフォルトのものとdroidgapのものなので、外部リンクが機能することができます。 droidgapの活動がなければ、外部リンクは何もしません。 – Sathariel