Android Open Source - phonegap-lite-android Phonegap Activity






From Project

Back to project page phonegap-lite-android.

License

The source code is released under:

MIT License

If you think the Android project phonegap-lite-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 * PhoneGap is available under *either* the terms of the modified BSD license *or* the
 * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
 * //from w ww  .j a  v  a 2s .  com
 * Copyright (c) 2005-2010, Nitobi Software Inc.
 * Copyright (c) 2010, IBM Corporation
 */
package com.phonegap.api;

import android.app.Activity;
import android.content.Intent;

/**
 * The Phonegap activity abstract class that is extended by DroidGap.
 * It is used to isolate plugin development, and remove dependency on entire Phonegap library.
 */
public abstract class PhonegapActivity extends Activity {

    /**
     * Add a class that implements a service.
     * 
     * @param serviceType
     * @param className
     */
    abstract public void addService(String serviceType, String className);
    
    /**
     * Send JavaScript statement back to JavaScript.
     * 
     * @param message
     */
    abstract public void sendJavascript(String statement);

    /**
     * Launch an activity for which you would like a result when it finished. When this activity exits, 
     * your onActivityResult() method will be called.
     *  
     * @param command      The command object
     * @param intent      The intent to start
     * @param requestCode    The request code that is passed to callback to identify the activity
     */
    abstract public void startActivityForResult(IPlugin command, Intent intent, int requestCode);

    /**
     * Set the plugin to be called when a sub-activity exits.
     * 
     * @param plugin      The plugin on which onActivityResult is to be called
     */
    abstract public void setActivityResultCallback(IPlugin plugin);

    /**
     * Load the specified URL in the PhoneGap webview.
     * 
     * @param url        The URL to load.
     */
    abstract public void loadUrl(String url);
}




Java Source Code List

__ID__.Activity.java
com.phonegap.App.java
com.phonegap.CallbackServer.java
com.phonegap.Device.java
com.phonegap.DroidGap.java
com.phonegap.HttpHandler.java
com.phonegap.StandAlone.java
com.phonegap.TempListener.java
com.phonegap.WebViewReflect.java
com.phonegap.api.IPlugin.java
com.phonegap.api.LOG.java
com.phonegap.api.PhonegapActivity.java
com.phonegap.api.PluginManager.java
com.phonegap.api.PluginResult.java
com.phonegap.api.Plugin.java
com.phonegap.file.EncodingException.java
com.phonegap.plugin.sqlitePlugin.SQLitePlugin.java