Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Estimote sdk is not able to scan other beacons than the estimote ones

I am trying to see beacons with the estimote sdk in android but with no luck!I can see all the estimote beacons but with all other beacons is not working (fobo beacons etc.) I am using the uuid for the fobo beacons inside the Region constructor and i can see in the logcat that the bluetooth can see the devices but estimode sdk is not collecting it as a beacon!Any ideas why this is happening? I m posting the code below:

 private static final String FOBO_PROXIMITY_UUID = "00158800-587d-2206-d52b-fb6d6e2f0001";
 private static final Region FOBOBEACONS = new Region("rid", FOBO_PROXIMITY_UUID , null, null);
 public void BeaconManager(){
    beaconManager = new com.estimote.sdk.BeaconManager(this);
    beaconManager.setBackgroundScanPeriod(5000, 30000);
    beaconManager.setForegroundScanPeriod(7000, 5000);



    beaconManager.setRangingListener(new com.estimote.sdk.BeaconManager.RangingListener() {

        @Override
        public void onBeaconsDiscovered(final Region arg0, final List<Beacon> arg1) {
            // TODO Auto-generated method stub
            runOnUiThread(new Runnable() {
                  @Override
                  public void run() {
                    // Note that beacons reported here are already sorted by estimated
                    // distance between device and beacon.
                      int test=0;
                      if(arg1.size()<=0){
                          Toast.makeText(MainActivity.this, "No beacon found",
                                  Toast.LENGTH_SHORT).show();
                      }else{

                          for (int i = 0; i < arg1.size(); i++) {
                              String beac=arg1.get(i).getProximityUUID();
                              Toast.makeText(MainActivity.this, "I found a beacon with UUID; "+beac,
                                      Toast.LENGTH_SHORT).show();  
                        }


                      }



                   // adapter.replaceWith(beacons);
                  }
                }); 
        }

    });
    connectToService();

}

  private void connectToService() {
    beaconManager.connect(new com.estimote.sdk.BeaconManager.ServiceReadyCallback() {
      @Override
      public void onServiceReady() {
        try {
          com.estimote.sdk.utils.L.enableDebugLogging(true);
          beaconManager.startRanging(FOBOBEACONS);

        } catch (RemoteException e) {
          Toast.makeText(MainActivity.this, "Cannot start ranging, something terrible happened",
              Toast.LENGTH_LONG).show();
        }
      }
    });
  }
like image 300
sfig Avatar asked Nov 01 '22 01:11

sfig


1 Answers

This is Wojtek Borowicz, I'm a community evangelist at Estimote. Actually, Estimote SDK does not support Beacons from other vendors - that's why you cannot detect them.

Cheers.

like image 150
Wojtek Borowicz Avatar answered Nov 11 '22 11:11

Wojtek Borowicz