+ * package org.apache.cordova.examples;
+ *
+ * import android.os.Bundle;
+ * import org.apache.cordova.*;
+ *
+ * public class Example extends CordovaActivity {
+ * @Override
+ * public void onCreate(Bundle savedInstanceState) {
+ * super.onCreate(savedInstanceState);
+ * super.init();
+ * // Load your application
+ * loadUrl(launchUrl);
+ * }
+ * }
+ *
+ *
+ * Cordova xml configuration: Cordova uses a configuration file at
+ * res/xml/config.xml to specify its settings. See "The config.xml File"
+ * guide in cordova-docs at http://cordova.apache.org/docs for the documentation
+ * for the configuration. The use of the set*Property() methods is
+ * deprecated in favor of the config.xml file.
+ *
+ */
+public class CordovaActivity extends Activity {
+ public static String TAG = "CordovaActivity";
+
+ // The webview for our app
+ protected CordovaWebView appView;
+
+ private static int ACTIVITY_STARTING = 0;
+ private static int ACTIVITY_RUNNING = 1;
+ private static int ACTIVITY_EXITING = 2;
+
+ // Keep app running when pause is received. (default = true)
+ // If true, then the JavaScript and native code continue to run in the background
+ // when another application (activity) is started.
+ protected boolean keepRunning = true;
+
+ // Flag to keep immersive mode if set to fullscreen
+ protected boolean immersiveMode;
+
+ // Read from config.xml:
+ protected CordovaPreferences preferences;
+ protected String launchUrl;
+ protected ArrayList