runtime ranging

Answered

Comments

4 comments

  • Official comment
    Adrian Ziobro

    It's hard to say anything definitive not seeing what exactly is happening on your phone, how is your app programmed, etc. Nonetheless, when it comes to Samsung we've discovered that they install on their phones an app/service that monitors battery intensive processes/apps and terminates them to conserve battery. If you have ranging going on non-stop, it will start impacting the battery without a doubt.

  • LINK Institut

    Hi Adrian

    Thanks for this input. I've now exclude the app from monitoring.I still have a Google pixel XL. I'le test that too.
    But what is the best practices for permanent ranging?

  • Konrad Bujak

    Hello,

    Please let me jump in here. As Adrian mentioned, Samsung has a tricky function, that monitors all the application running in the background. Some of the Samsungs automatically "kill" applications that have an influence on battery and was not in the foreground for a while. 

    To be honest, ranging is not recommended for background scanning in end-user applications. However, if you need it the best practice would be to switch to monitoring from ranging if you do not discover beacons for a couple of minutes (i.e. 5 minutes). Let's try configuration of monitoring activePeriodMillis = 5 seconds and passivePeriodMillis = 20 seconds. Next, when your phone discovers again your beacons, switch back to the ranging. 

    What is more, you can also add notifications/log dumps about the status of the background service/scanning (ScanStatusListener) for the purpose of the tests, so that you will see what's going on. 

    Best,

    Konrad

  • LINK Institut

     Hi

    I've locatet the problem.

    1. I've disable/enable Bluetooth, via air plain mode, over night. Ranging not work anymore after I enable Bluetooth next morning. I must stop/start ranging.

    2. I change to monitoring.

     greetings from Switzerland

Please sign in to leave a comment.