Assigned
Status Update
Comments
la...@google.com <la...@google.com>
la...@google.com <la...@google.com> #2
Thank you for posting.
Can you fork the Google Maps Android API sample demo existing activities into this link below:
Screenshots of the error message illegalStateException
are also acceptable along with the sample code.
br...@cfacorp.com <br...@cfacorp.com> #3
You don't believe me? It should be in the nav sdk code. I'm just asking that the documentation be updated so we know every function that actually isn't thread-safe.
java.lang.IllegalStateException: Expected to be running on the main thread, but running on thread with name 'DefaultDispatcher-worker-9'
at com.google.android.libraries.navigation.internal.yg.as.o(PG:1)
at com.google.android.libraries.navigation.internal.ne.i.b(PG:3)
at com.google.android.libraries.navigation.internal.kb.ae.l(PG:1)
at com.google.android.libraries.navigation.environment.r.d(PG:1)
at com.google.android.libraries.navigation.environment.r.b(PG:1)
at com.google.android.libraries.navigation.internal.wi.fg.cleanup(PG:3)
la...@google.com <la...@google.com> #4
Thanks for your report.
We have notified the docs team and added this to their pipeline. Once they make the change we will mark this issue as Fixed.
Description
#IMPORTANT: If your production system or service is down file a Severity 1 support case at console.cloud.google.com/google/maps-apis/support
===========================================================================================
#REMINDER: Please do not disclose any possible PII such as: email address, IP, contact number, any part of name, project numbers and billing accounts as these information may violate security and privacy. Comments or attachments that include PII will be removed and restricted from public viewing.
Furthermore, please refrain from replying to a comment as this will make your email address visible. Instead, you may use the Issue Tracker’s comment feature for your replies.
It is OK to share your API Project ID, but not API keys or client ID credentials.
To learn more about personal data, visithttps://en.wikipedia.org/wiki/Personal_data
===========================================================================================
Please put together a simplified reproduction case, and put it up as a project on your choice of git hosting providers (e.g. github, bitbucket, etc). The easiest way to do this might be to fork the Google Navigation SDK Sample Applications Repository and modify the sample applications:https://github.com/googlemaps-samples/android-navigation-samples
What steps will reproduce the problem?
The navigator.cleanup() function throws an IllegalStateException when not run on the main thread, despite the documentation saying otherwise.
We observed this is in NavSDK 6.0.2 and android pixel 6 running android 13. Pretty sure this isn't working on 5.5.2 as well.
Here is the documentation:https://developers.google.com/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/navigation/Navigator
It clearly states that the only functions that need to be run on the main thread are setAudioGuidance() and setHeadsUpNotificationEnabled(). It says all other functions are thread safe.
I understand that the examples used by google all call navigator.cleanup() in onDestroy. But our app does not do that (well, it does do that, but not exclusively), since we need to control navigator sessions while the user is in a non-navigation portion of our app. It would be helpful in the documentation to know which functions are actually threadsafe and which are not without any assumptions.
Also add the following details:
Also attach screenshots, sample code and optionally an APK if possible.
If the problem exhibits itself in a released version of your app on the Play Store, optionally provide a link to the app, and explain how to reproduce the issue in the app.