mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Add services supported and their class names.
This commit is contained in:
parent
cda0319be3
commit
a21080fb76
@ -252,6 +252,16 @@ public class DroidGap extends Activity {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a class that implements a service.
|
||||
*
|
||||
* @param serviceType
|
||||
* @param className
|
||||
*/
|
||||
public void addService(String serviceType, String className) {
|
||||
this.pluginManager.addService(serviceType, className);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind PhoneGap objects to JavaScript.
|
||||
*
|
||||
@ -284,6 +294,17 @@ public class DroidGap extends Activity {
|
||||
this.pluginManager.addPlugin("com.phonegap.GeoBroker");
|
||||
|
||||
}
|
||||
|
||||
this.addService("Accelerometer", "com.phonegap.AccelListener");
|
||||
this.addService("Compass", "com.phonegap.CompassListener");
|
||||
this.addService("Media", "com.phonegap.AudioHandler");
|
||||
this.addService("Camera", "com.phonegap.CameraLauncher");
|
||||
this.addService("Contacts", "com.phonegap.ContactManager");
|
||||
this.addService("Crypto", "com.phonegap.CryptoHandler");
|
||||
this.addService("Location", "com.phonegap.GeoBroker");
|
||||
this.addService("Network Status", "com.phonegap.NetworkManager");
|
||||
this.addService("Storage", "com.phonegap.Storage");
|
||||
this.addService("Temperature", "com.phonegap.TempListener");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user