0

under android, can i run the code below :

int locationMode = Settings.Secure.getInt(this.getContentResolver(), Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_HIGH_ACCURACY);

from a background thread (not from the main ui thread) ?

  • AFAIK, yes. Under the covers, it's just using `ContentResolver` to query a `ContentProvider`. Did you run into problems when you tried it? – CommonsWare Jul 30 '17 at 19:43
  • If you for some reason wouldn't be able to, you can get an activity instance and use runOnUiThread – Zoe Jul 30 '17 at 19:50
  • thanks, no right now i just want to know if it's work in theory... i try it's didn't crash, but didn't crash not mean it's work ;) –  Jul 30 '17 at 20:44

0 Answers0