Remove unused module classes.

This commit is contained in:
Bryce Curtis 2010-09-09 11:04:29 -05:00
parent 2d2adf29fd
commit 7f3cf4a884
2 changed files with 0 additions and 103 deletions

View File

@ -1,49 +0,0 @@
package com.phonegap;
import android.content.Intent;
import android.webkit.WebView;
/**
* This class should be extended by a PhoneGap module to register an onActivityResult() callback
* with DroidGap. It allows modules to start activities with result callback without having to
* modify DroidGap.java.
*/
public abstract class ActivityResultModule extends Module {
public int requestCode;
/**
* Constructor.
*
* @param view
* @param gap
*/
public ActivityResultModule(WebView view, DroidGap gap) {
super(view, gap);
this.requestCode = gap.addActivityResult(this);
}
/**
* Called when an activity you launched exits, giving you the requestCode you started it with,
* the resultCode it returned, and any additional data from it.
*
* @param requestCode The request code originally supplied to startActivityForResult(),
* allowing you to identify who this result came from.
* @param resultCode The integer result code returned by the child activity through its setResult().
* @param data An Intent, which can return result data to the caller (various data can be attached to Intent "extras").
*/
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
}
/**
* Launch an activity for which you would like a result when it finished. When this activity exits,
* your onActivityResult() method will be called.
*
* @param intent
*/
public void startActivityForResult(Intent intent) {
this.gap.startActivityForResult(intent, this.requestCode);
}
}

View File

@ -1,54 +0,0 @@
package com.phonegap;
import android.webkit.WebView;
/**
* This class represents a PhoneGap module and should be extended by all modules
* that provide functionality to PhoneGap. If the module invokes an activity and
* expects a result back (see CameraLauncher), then it should extend ActivityResultModule
* instead.
*/
public abstract class Module {
protected DroidGap gap; // DroidGap object
protected WebView view; // WebView object
/**
* Constructor.
*
* @param view
* @param gap
*/
public Module(WebView view, DroidGap gap) {
this.gap = gap;
this.view = view;
}
/**
* Called when the system is about to start resuming a previous activity.
*/
public void onPause() {
}
/**
* Called when the activity will start interacting with the user.
*/
public void onResume() {
}
/**
* The final call you receive before your activity is destroyed.
*/
public void onDestroy() {
}
/**
* Send JavaScript statement back to JavaScript.
*
* @param message
*/
public void sendJavascript(String statement) {
this.gap.callbackServer.sendJavascript(statement);
}
}