Skip to Navigation | Skip to Content



PhoneGap.jar | November 24th, 2009

Hey

Recently, we’ve been making changes similar to the iPhone code so that we can make it even easier for people to write Android Applications. We’ve encapsulated the PhoneGap source code into a JAR file, so that your Android Application can literally be as short as this:


import android.os.Bundle;
import com.phonegap.*;
public class TestApp extends DroidGap {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("file://android_asset/www/index.html");
}
}

Of course, you’d have to have the AndroidManifest setup correctly to accomodate the activities, but this is minor in comparison to how messy everything’s been before this change. We’ll have to do more restructuring of the repository to demonstrate how to use the new library in Android Applications, and this should allow for the Java code to be abstracted away and made even easier. Of course, we’d have to do more work to figure out how this will work on Android 2.0, but it’s some exciting stuff.

Posted in Android | 4 Comments » | Add to Delicious | Digg It

This entry was posted on Tuesday, November 24th, 2009 at 12:45 pm and is filed under Android. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

4 Responses to “PhoneGap.jar”

  1. Markus Says:

    Great, this will make things easier. I guess phonegap.js etc. will still be outside the jar and has to be copied to a project’s assets?
    When can we expect a stable version with it?

  2. Markus Says:

    I guess the DroidGap class members will be protected then? Or accessible by getters (the more stable approach in my eyes)? I am asking because we need access to the WebView object, e.g. for adding our own objects to JavaScript (addJavascriptInterface).

  3. Diego Says:

    Thanks for this jar. Where can I download it ? I didn’t find it in PhoneGap framework .tgz file…

  4. Andrew Says:

    “We’ve encapsulated the PhoneGap source code into a JAR file”

    I’d like to ask whether phoneGap.jar is open source ?

Leave a Reply