Exemple #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();
   }
 }
Exemple #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);
 }
Exemple #3
0
    @Override
    public void onSdkAuthorizationSuccess() {
      Log.e("MyOBTSdkAuthListener", "success");

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