Class MedMDeviceKit

java.lang.Object
com.medm.devicekit.MedMDeviceKit

public class MedMDeviceKit extends Object
Main MedM DeviceKit entry point. There are essential entry points to use DeviceKit:

Sample usage:

  import com.medm.devicekit.*;

 public class MyActivity extends Activity {
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         try {
             MedMDeviceKit.init(getApplication(), "device-kit-demo-key");
         } catch (InvalidLicenseKeyException ex)
         {
             ex.printStackTrace();
         }
     }

     protected void onResume() {
         super.onResume();
         try {
             MedMDeviceKit.getCollector().start(
                 new IDataCallback() {
                     public void onNewData(IDeviceDescription source, String readingXML) {
                         // Handle new data
                     }

                     public void onDataCollectionStopped() {  }
                 },
                 null // Don't receive updates on device status change
             );
         } catch (MedMDeviceKitNotInitializedException ex)
         {
             ex.printStackTrace();
         }
     }
 }