mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-07 23:03:11 +08:00
Wiring up CompassHook
This commit is contained in:
parent
2d52f941c9
commit
9e391d0823
@ -51,6 +51,7 @@ public class DroidGap extends Activity {
|
|||||||
private ContactManager mContacts;
|
private ContactManager mContacts;
|
||||||
private FileUtils fs;
|
private FileUtils fs;
|
||||||
private NetworkManager netMan;
|
private NetworkManager netMan;
|
||||||
|
private CompassListener mCompass;
|
||||||
|
|
||||||
/** Called when the activity is first created. */
|
/** Called when the activity is first created. */
|
||||||
@Override
|
@Override
|
||||||
@ -109,6 +110,7 @@ public class DroidGap extends Activity {
|
|||||||
mContacts = new ContactManager(this, appView);
|
mContacts = new ContactManager(this, appView);
|
||||||
fs = new FileUtils(appView);
|
fs = new FileUtils(appView);
|
||||||
netMan = new NetworkManager(this, appView);
|
netMan = new NetworkManager(this, appView);
|
||||||
|
mCompass = new CompassListener(this, appView);
|
||||||
|
|
||||||
// This creates the new javascript interfaces for PhoneGap
|
// This creates the new javascript interfaces for PhoneGap
|
||||||
appView.addJavascriptInterface(gap, "DroidGap");
|
appView.addJavascriptInterface(gap, "DroidGap");
|
||||||
@ -118,6 +120,7 @@ public class DroidGap extends Activity {
|
|||||||
appView.addJavascriptInterface(mContacts, "ContactHook");
|
appView.addJavascriptInterface(mContacts, "ContactHook");
|
||||||
appView.addJavascriptInterface(fs, "FileUtil");
|
appView.addJavascriptInterface(fs, "FileUtil");
|
||||||
appView.addJavascriptInterface(netMan, "NetworkManager");
|
appView.addJavascriptInterface(netMan, "NetworkManager");
|
||||||
|
appView.addJavascriptInterface(mCompass, "CompassHook");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user