4

I am using the Fused Location Provider API to both get current location and to request regular location updates. As far as I can tell, my permissions are configured correctly (both fine and coarse are present in my manifest and checked for and requested at runtime) and the location updates (callbacks) are working as expected. The only odd thing I am noticing are these logcat messages which are appearing at the error level with tags like [LocationManager] and [FusedLocationAPI]. They don't appear to be describing exceptions, only reporting the action being performed like adding/removing location updates from my app or doing an asynchronous location update request.

I tried some googling around but can't seem to make any headway on figuring out why I am seeing them and what they are trying to tell me. My best guess so far is based on the presence of the string (10240_FINE_fg_true_foreground). Perhaps my location updates are happening in the foreground without proper permission? Currently I am performing all of these actions all withing my main activity (due to the relative simplicity of my app), but should I refactor and put all of my location retrieving code into a separate foreground service and add the requisite permissions?

Here is what I am seeing:

FusedLocation remove updates error Message

Location request error messages

Let me know if it would help to see code where I am invoking the API.

  • 4
    Just because they're tagged error doesn't mean they're errors. It just means it used that channel to output. Is your location code working? If so, don't worry about it. If not, ask about that instead. – Gabe Sechan Sep 20 '22 at 17:19
  • I figured they aren't errors since they don't describe exceptions and my code is working as expected. Just not sure why they are being tagged as error. – PearlyCouscous Sep 20 '22 at 17:36
  • 3
    Because the guy who wrote the code used Log.e instead of Log.d, and nobody told him to fix it in the code review. Its a fairly common thing to have happen – Gabe Sechan Sep 20 '22 at 17:39
  • 2
    logs are really noisy and you get a lot of stuff in there, including exceptions - it's not necessarily anything *you* need to worry about though, just something other libraries and services feel the need to log for whatever reason. If your code is working, and the messages don't specifically refer to something you're doing and imply you need to make specific changes, then don't worry about it! – cactustictacs Sep 20 '22 at 18:36
  • Thanks for the help you guys! Just making sure my bases are covered. – PearlyCouscous Sep 20 '22 at 18:42

0 Answers0