Closed anielgroup closed 5 months ago
Hi @anielgroup, thanks for reporting. Is this on Android or iOS?
Android, we didn't test Ios yet
Thanks @anielgroup, we're taking a look FYI @caio1985
Hi @anielgroup. I tried to reproduce the issue but wasn't able to encounter it. Attached is a screen recording link of Android Profiler where we can see the app CPU, memory and battery utilization. We can say that using the library, the app only utilizes below 25% of CPU, below 400MB of memory and "light" battery consumption while on navigation mode for about 15 mins as per testing.
See the video on this link: https://drive.google.com/file/d/16fX4HQnJ4gEg8EqwppTQZvfOlaluwegn/view?usp=sharing
Tested this using a real device - Samsung S22 running Android 14.
cc @ArturoSalazarB16 @zbillones-navagis
Hi @anielgroup, can you please share more details on the device you encounter the issue? (API level, Device name, Real versus Emulator device, etc). Also, are you able to reproduce this consistently?
Thanks, Arturo
Hi @ArturoSalazarB16
We use buildToolsVersion = "33.0.0" minSdkVersion = 23 compileSdkVersion = 33 targetSdkVersion = 33 appCompatVersion = "1.4.2" googlePlayServicesLocationVersion = "20.0.0" playServicesLocationVersion = "21.0.1" and implementation "com.google.android.libraries.navigation:navigation:5.2.3" navigation wi are testing on several devices including Samsung note 9, Samsung 21 ultra, Xiaomi Redmi 5 , Samsung S23
Thanks @anielgroup, in order to be able to diagnose the issue, can you please share:
Hey @ArturoSalazarB16 Yes this is appear on our app Attached sample of code GoogleMap.txt Video of our app
OS level of the devices you're using to test. Are you able to reproduce consistently in all devices? we tested on the 2 android phone Samsung note 9 , Samsung S21 Ultra
Are you able to reproduce this on any routes? can you please share route details (origin, destination, other parameters they are using, ie. route token, etc) route token I could not find, we tested addresses: 1 Origin: תוצרת הארץ 1 פתח תקווה Destination: יצחק נבון 6 קריית אונו 2 Origin: תוצרת הארץ 1 פתח תקווה Waypoint: מגשימים 20 פתח תקווה Destination: השילוח 9 פתח תקווה 3 Origin: השילוח 9 פתח תקווה Destination: לחי 17 בני ברק
Hi @ArturoSalazarB16 We created a copy of our project, but left only 1 page so that you could see the screen freeze. link on the github - https://github.com/Dexail/AniwayTestMobile
Hi @Dexail . We were able to build the project in Android. However, we can only see a map with 3 markers in it, a top bar with check icon on the left and right arrow on the right which does nothing when you tap, and a bottomsheet showing the info of the journey. If this is the only screen you left for us to see the app freezing, on which part should we expect it to happen?
Hi @ArturoSalazarB16 You need to start the navigation. Here's an example on the APK I created from the repository I shared with you earlier. If navigation doesn't start, try closing and reopening the application again.
Hi @ArturoSalazarB16, Did you reproduce the freezing issue ?
Hi @anielgroup @Dexail, thanks for the information.
@mtrecenio-navagis @zbillones-navagis - can you please try to get a repro based on the context above?
Hi @anielgroup @Dexail , yes, we were able to reproduce the issue.
We've checked your code in GoogleMap.tsx and found out that the culprit on the battery drain issue is the call for startUpdatingLocation()
which then call for the RoadSnappedLocationProvider. Subscribing to this callback will consume more battery power than usual navigation which is documented here: https://developers.google.com/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/navigation/RoadSnappedLocationProvider
cc @ArturoSalazarB16 @zbillones-navagis
@anielgroup @Dexail - We are reinvestigating this issue. On our test using the repo that you've shared here, 1/10 instance app freeze is encountered. Having the startUpdatingLocation()
in the code should not be an issue. We are digging deeper into what really causing it as we can't replicate this issue using our SampleApp.
Also, you may want to consider removing the vibration while on navigation by using navigationViewController.setAudioGuidanceType(AudioGuidance.VOICE_ALERTS_ONLY)
to save battery, atleast.
More updates to come.
@ArturoSalazarB16 @zbillones-navagis
@ArturoSalazarB16 @zbillones-navagis Hi Thank you, it really helped reduce the phone charger's consumption. Have you tried running navigation on iOS? It's just that on my iPhone 14 with the latest iOS version, navigation simply doesn't start.
P.S. If I try to set a new route, it doesn't build it on iOS. But if the route is based on already established points (for example, if I open the map on Android, it builds the route, then close and reopen it on iOS), then it builds on iOS.
Hi @Dexail, we are looking into checking with iOS with your reported issue as well. We'll keep you posted. Thanks!
Update on the iOS build @Dexail . I was able to build it on simulator running iOS 16.4. However, it does not get me into the map and got stuck on the animated splash screen with the aniway logo. I can hear the navigation voice alerts while on this splash screen. Screen recorded for reference.
Also, were you able to check if the app still freezing on your end having the navigationViewController.setAudioGuidanceType(AudioGuidance.VOICE_ALERTS_ONLY) added to the code? Please let us know. Thanks!
Hi @anielgroup,
Are you still encountering this issue, or have you been able to identify the cause? If this is an issue with the SDK, we would appreciate more information on the issue or how it was fixed. This will help us in resolving this.
Thank you!
Hi The issue of the screen freezing on the mobile phone was within the SDK itself. This occurred inside the plugin during distance calculation, causing it to crash and hang. The reason for this was the promise not being rejected when it failed, which resulted in the application freezing. We spent a lot of time, but we managed to fix the recalculation, and now there haven't been any instances of the application freezing.
In any case, thanks for trying to help us
When the navigation works for a long time and the trip is longer than 15 minutes, the phone starts to heat up very much and freezes appear. When the screen just freezes and then prompts you to close the application