requestLocationUpdates throws exception
问题 I am creating a service that periodically updates the position. but using the following code, it throws me: runException Can't create handler inside thread that has not called Looper.prepare() This code is running inside doInBackground of Async class in service private void UpdatePosition() { locManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); Location location = locManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); showPosition(location); locationListener = new