I’m writing an application that needs to perform some tasks only if there is no ongoing network usage by other applications/system.
There is this cute little arrow in the upper right corner that shows it, but of course, I need to check it programatically. Is there any function in the API that would allow me to do so?
I’m developing for BB OS 6.0. I have searched Stack Overflow and google with no luck. I would appreciate pointing me in the right direction.
That is controlled by the OS and AFAIK there’s no way to check it from your app’s code. But as you have pointed out, there’s that arrow in the top right corner. If you could take a screenshot and the top bar appeared in it, you could detect the network activity in a given instant.
Using the APIs the only thing you can do is to check for connectivity. If there is no coverage, you can be sure there is no network traffic (but at the same time you can’t use the network). You can also count the number of sent or received packets using
RadioInfoclass.