Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proximity value getting null and accuracy value getting -1 every time I run my app #22

Open
amithkumarsingh opened this issue Jun 12, 2020 · 0 comments

Comments

@amithkumarsingh
Copy link

private BCBeaconManager mBeaconManager;

@Override
public void onCreate() {
    super.onCreate();

    mServiceContext = BlueCatsSDKInterfaceService.this;

    mBeaconManager = new BCBeaconManager();
    mBeaconManager.registerCallback(mBeaconManagerCallback);

    Log.d(TAG, "onCreate");
}

@Override
public int onStartCommand(final Intent intent, final int flags, final int startId) {
    Log.d(TAG, "onStartCommand");

    super.onStartCommand(intent, flags, startId);

    String appToken = "";
    if (intent != null && intent.getStringExtra(BlueCatsSDK.EXTRA_APP_TOKEN) != null) {
        appToken = intent.getStringExtra(BlueCatsSDK.EXTRA_APP_TOKEN);
    }

    // add any options here
    Map<String, String> options = new HashMap<String, String>();
         BlueCatsSDK.setOptions(options);
    BlueCatsSDK.startPurringWithAppToken(getApplicationContext(), appToken);
    Log.d(TAG, "startPurringWithAppToken " + appToken);

    // start the service and keep running even if activity is destroyed

    return START_STICKY;
}

@Override
public void onDestroy() {
    Log.d(TAG, "onDestroy");

    super.onDestroy();
}

   private BCBeaconManagerCallback mBeaconManagerCallback = new BCBeaconManagerCallback() {
    
    @Override
    public void didEnterBeacons(List<BCBeacon> beacons) {
        Log.d(TAG, "didEnterBeacons");
        super.didEnterBeacons(beacons);
    }

    @Override
    public void didExitBeacons(List<BCBeacon> beacons) {
        Log.d(TAG, "didExitBeacons");
        super.didExitBeacons(beacons);
    }

    @Override
    public void didRangeBeacons(List<BCBeacon> beacons) {
        Log.d(TAG, "didRangeBeacons");
        super.didRangeBeacons(beacons);
    }

};

The didEnterBeacon() and didExitBeacon() method calback are getting called by didRangeBeacon() method is not getting called.

Also checking the deatils of deacon in didEnterBeacon() the proximity value is getting null and accuracy is getting -1 every time when I are the app

Note : I am testing the app by using other beacon transmitter app by replacing the ProximityUUID with available ProximityUUID in Bluecats portal not with Real Beacon device

Help me with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant