When app.exitApp() is called on multi-page app, pass to previous pages in stack and close them too.

This commit is contained in:
Bryce Curtis
2011-09-28 21:52:17 -05:00
parent 025577c41d
commit 0f988717d0
2 changed files with 31 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ package com.phonegap;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.app.Activity;
import com.phonegap.api.Plugin;
import com.phonegap.api.PluginResult;
import java.util.HashMap;
@@ -172,7 +173,8 @@ public class App extends Plugin {
* Exit the Android application.
*/
public void exitApp() {
((DroidGap)this.ctx).finish();
((DroidGap)this.ctx).setResult(Activity.RESULT_OK);
((DroidGap)this.ctx).onDestroy();
}
/**