In this code, I request location updates from GPS
locMan.requestLocationUpdates(LocationManager.GPS_PROVIDER,20000, 1, gpsListener);
But how can I make sure it also listens for Wi-Fi or Cell ID updates?
You should be able to call requestLocationUpdates(), with various objects LocationListener, for other suppliers.
requestLocationUpdates()
LocationListener
Actually, you can use the same listener. Just the Location.getProvider () user in the listener to find out which provider generated the update.
Source: https://habr.com/ru/post/1751655/More articles:Form Based Authentication - securityEquality between two separate xy-pic diagrams in LaTeX - latexPHP / MYSQL Database Search Question - phpЯвляется ли android: id специфичным для xml файла или всего проекта? - androidAre maven banks safe? - maven-2How many flags checked - javascriptКаков наилучший способ управления версиями веб-приложений Java? - javaPHP и другие языки в реализациях Hadoop/MapReduce, а в Cloud обычно - javaSQL syntax error with Derby and Circumflex ORM - scalaГде распространяемые модули слияния для выпуска Visual Studio С++ Express? - visual-c++All Articles