isAppConnected not working

I am trying to get the status of Hardware if it is connected to the app or not. I am using HTTP API isAppConnected but it’s not working. It returns false most of the time and hardly returns true even thought hardware is connected to the App. Is there any other way to check if hardware is connected to App?
Thanks

Do you have this option enabled in the app:

Pete.

Yes, I get the notification on my device though when it is offline. However I am trying to check the same via HTTP API for my central controller. HTTP API does not return the correct result.