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.
November 24th, 2009 at 9:28 pm
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?
November 24th, 2009 at 9:54 pm
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).
November 26th, 2009 at 9:53 am
Thanks for this jar. Where can I download it ? I didn’t find it in PhoneGap framework .tgz file…
December 1st, 2010 at 6:05 am
“We’ve encapsulated the PhoneGap source code into a JAR file”
I’d like to ask whether phoneGap.jar is open source ?