Add services supported and their class names.

This commit is contained in:
Bryce Curtis 2010-09-10 11:31:22 -05:00
parent cda0319be3
commit a21080fb76

View File

@ -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");
}
/**