Estimote / Android-Fleet-Management-SDK

Estimote Fleet Management SDK for Android
https://developer.estimote.com
MIT License
836 stars 451 forks source link

beacons detection is not working properly, sometimes they get detected but most of the time they are not #285

Closed myoussry closed 6 years ago

myoussry commented 6 years ago

Prerequisites

Basic information

Estimote SDK version: estimote:sdk:1.4.1 minSdkVersion 19 compileSdkVersion 26

Android devices affected: HUAWI Mate 10 lite, Model: RNE-L21, Android 7.0 Infinix hot 4 lite, Model : X557, Android version: 6.0 HUAWI GR5, Model: KII-L21, Android version: 6.0.1

Beacon hardware version: Estimote OS 4.13.2

Description

beacons sometimes get detected but most of the time is not below is a video showing the beacons are detected on Estimote app and not detected on our app on HUAWI Mate 10 lite : https://www.dropbox.com/s/okoezmtp95z1neh/WhatsApp%20Video%202018-04-12%20at%201.56.28%20PM.mp4?dl=0

(Optional) Steps to reproduce: i had attached the code to reproduce it

Expected behavior: beacons should get detected fast and whenever is required

Actual behavior: beacons sometime get detected but most of the time is not being detected

Logs and code

region = new BeaconRegion("ranged region", UUID.fromString("B9407F30-F5F8-466E-AFF9-25556B57FE6D"), null, null);
beaconManager = new BeaconManager(context);
        beaconManager.setBackgroundScanPeriod(5000, 5000);
        beaconManager.setForegroundScanPeriod(5000, 5000);

 beaconManager.connect(new BeaconManager.ServiceReadyCallback() {
            @Override
            public void onServiceReady() {
                beaconManager.startRanging(region);
            }
        });

        beaconManager.setRangingListener(new BeaconManager.BeaconRangingListener() {
            @Override
            public void onBeaconsDiscovered(BeaconRegion beaconRegion, List<Beacon> beacons) {

            }
        });
Poberro commented 6 years ago

Could you elaborate more on "beacons sometimes get detected but most of the time is not"? How frequently it is happening? Once per minute? Once per hour? Every few seconds? 7 out of 10 enter events?

Have you tried to check if Estimote App works on those both phones? Because Estimote App uses Proximity SDK to scan beacons, not classic Android SDK, so basically you are comparing behavior of two different SDKs. Does you app also behave differently on those phones showed in video?

Scanning in Android SDK is deprecated and Proximity SDK is recommended way of performing scanning: https://github.com/Estimote/Android-Proximity-SDK. Can you try that?

You have set both foreground (ranging) and background (monitoring) periods to 5s scanning and 5s sleeping. Try experimenting with shorter sleeping values as see if it would improve responsivness. Like:

beaconManager.setBackgroundScanPeriod(5000, 0);
beaconManager.setForegroundScanPeriod(5000, 0);

which would start continuous scanning.

Poberro commented 6 years ago

No answer from author. Closing. Ranging and monitoring is deprecated in this SDK, users should use Proximity SDK instead.

rafperezsilva commented 3 years ago

I have the same issue on devices whit Android 10, Can proximity zones be built from UUID, major and minor?