0

I am working on an android app which keeps checking my location using GPS and automatically stops recording if not moving for more than 3 mins. But sometimes may be due to poor signal it is not able to stop automatically.

is there anyway to determine the poor network signal in my android code ? I have seen few posts on PhoneStateListener but how to check if the signal is poor in android code.

shining
  • 11
  • 3

1 Answers1

0

You didn't post your code, so I assume you have a WifiManager object, using that you can request a getConnectionInfo() method. Along with it, you should create a class that extends BroadcastReceiver which will implement onReceive where you can get a list of ScanResult there you'll get all info about your network including the signal strength.

This link, will help you.

Rigotti
  • 2,766
  • 23
  • 28