mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
Fixing scoping issues where PhoneGap would get Garbage Collected.
This commit is contained in:
parent
a5b0cf29ce
commit
2ee0d95b61
@ -41,6 +41,10 @@ public class DroidGap extends Activity {
|
|||||||
private static final String LOG_TAG = "DroidGap";
|
private static final String LOG_TAG = "DroidGap";
|
||||||
private WebView appView;
|
private WebView appView;
|
||||||
private String uri;
|
private String uri;
|
||||||
|
private PhoneGap gap;
|
||||||
|
private GeoBroker geo;
|
||||||
|
private AccelListener accel;
|
||||||
|
|
||||||
|
|
||||||
/** Called when the activity is first created. */
|
/** Called when the activity is first created. */
|
||||||
@Override
|
@Override
|
||||||
@ -89,9 +93,9 @@ public class DroidGap extends Activity {
|
|||||||
private void bindBrowser(WebView appView)
|
private void bindBrowser(WebView appView)
|
||||||
{
|
{
|
||||||
// The PhoneGap class handles the Notification and Android Specific crap
|
// The PhoneGap class handles the Notification and Android Specific crap
|
||||||
PhoneGap gap = new PhoneGap(this, appView);
|
gap = new PhoneGap(this, appView);
|
||||||
GeoBroker geo = new GeoBroker(appView, this);
|
geo = new GeoBroker(appView, this);
|
||||||
AccelListener accel = new AccelListener(this, appView);
|
accel = new AccelListener(this, appView);
|
||||||
// This creates the new javascript interfaces for PhoneGap
|
// This creates the new javascript interfaces for PhoneGap
|
||||||
appView.addJavascriptInterface(gap, "Device");
|
appView.addJavascriptInterface(gap, "Device");
|
||||||
appView.addJavascriptInterface(geo, "Geo");
|
appView.addJavascriptInterface(geo, "Geo");
|
||||||
|
Loading…
Reference in New Issue
Block a user