Skip to content

Commit

Permalink
Fixing scoping issues where PhoneGap would get Garbage Collected.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Bowser committed Jul 13, 2009
1 parent f73be7c commit 90e0c05
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions android/src/com/phonegap/demo/DroidGap.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public class DroidGap extends Activity {
private static final String LOG_TAG = "DroidGap";
private WebView appView;
private String uri;
private PhoneGap gap;
private GeoBroker geo;
private AccelListener accel;


/** Called when the activity is first created. */
@Override
Expand Down Expand Up @@ -89,9 +93,9 @@ public void onConfigurationChanged(Configuration newConfig) {
private void bindBrowser(WebView appView)
{
// The PhoneGap class handles the Notification and Android Specific crap
PhoneGap gap = new PhoneGap(this, appView);
GeoBroker geo = new GeoBroker(appView, this);
AccelListener accel = new AccelListener(this, appView);
gap = new PhoneGap(this, appView);
geo = new GeoBroker(appView, this);
accel = new AccelListener(this, appView);
// This creates the new javascript interfaces for PhoneGap
appView.addJavascriptInterface(gap, "Device");
appView.addJavascriptInterface(geo, "Geo");
Expand Down

0 comments on commit 90e0c05

Please sign in to comment.