예제 #1
0
 private void initSingletons() {
   try {
     // Call to initialize the OBTSDK
     OBTSDK.initialize(this);
     Log.e("main", "OBT SDK initialized");
     OBTSDK.authorizeSdk(new MyOBTSdkAuthListener());
   } catch (PackageManager.NameNotFoundException e) {
     e.printStackTrace();
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
예제 #2
0
 @Override
 public void onNearbyBrushesFoundOrUpdated(List<OBTBrush> nearbyBrushes) {
   Log.e("found brush", "" + nearbyBrushes.size());
   if (!nearbyBrushes.isEmpty())
     // Connect to first Oral-B Toothbrush
     OBTSDK.connectToothbrush(nearbyBrushes.get(0), true);
 }
예제 #3
0
    @Override
    public void onSdkAuthorizationSuccess() {
      Log.e("MyOBTSdkAuthListener", "success");

      try {
        OBTSDK.startScanning();
      } catch (Exception e) {
        e.printStackTrace();
      }
    }