Adding console.log capability to PhoneGap

This commit is contained in:
Brock Whitten 2010-02-26 11:25:28 -08:00
parent 64574be133
commit 1d4a67cdad

View File

@ -216,6 +216,7 @@ public class DroidGap extends Activity {
public final class EclairClient extends GapClient public final class EclairClient extends GapClient
{ {
private String TAG = "PhoneGapLog";
private long MAX_QUOTA = 2000000; private long MAX_QUOTA = 2000000;
public EclairClient(Context ctx) { public EclairClient(Context ctx) {
@ -239,6 +240,13 @@ public class DroidGap extends Activity {
quotaUpdater.updateQuota(currentQuota); quotaUpdater.updateQuota(currentQuota);
} }
} }
// This is a test of console.log, because we don't have this in Android 2.01
public void addMessageToConsole(String message, int lineNumber, String sourceID)
{
Log.d(TAG, sourceID + ": Line " + Integer.toString(lineNumber) + " : " + message);
}
} }