Android: Map is frozen when resuming app

342
5
Jump to solution
03-20-2024 12:17 PM
Labels (3)
FelicityRhone
New Contributor III

I think this only occurs on Samsung phones, on Android 14.

It's a problem in our production app, but also easy to reproduce in a new Maui app (I shared my demo app here https://github.com/Felicity-R/EsriMapTest/issues).

Repro steps:

  1. Create a new Maui app (.Net 8 )
  2. Add reference to Esri Maps SDK (200.3). Add .UseArcGISRuntime() in MauiProgram and set up API key.
  3. Replace default controls in MainPage with a MapView - set up a basemap and load map.
  4. Launch the app on Android. Observe that the map loads and is interactable.
  5. Switch to a different Android app so your Maui app is backgrounded. Wait about 10 seconds\*.
  6. Switch back to the Maui app. The bug: Observe that the map is visible but won't visibly respond to interaction - is frozen. If you rotate your device (e.g. from portrait to landscape) then the map will 'wake up' and be interactable again.
  7. Extra info: If you have location display enabled, then the map will be blank/gray instead of just non-interactable, if the location indicator was in your extent when you backgrounded the app. Rotation still fixes it.

Possibly related to this issue someone reported in the Runtime SDK for Android: https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/map-is-freezed-when-switching...

\* watching the logs, I know the map will be frozen after I see this message come up while backgrounded:
[Choreographer] CoreRune.SYSPERF_ACTIVE_APP_BBA_ENABLE : stop animation in background states

1 Solution

Accepted Solutions
aeldib
by
New Contributor

Esri has logged a bug for this issue:

BUG-000166099 Map view interactions freeze after returning to ArcGIS Maps SDK for .NET MAUI Android App on physical Samsung Galaxy devices with Android 14

As @FelicityRhone suggested, the issue is caused by a flutter/samsung bug.

The issue might be fixed in the Samsung's OneUI 6.1 patch, which should have been rolling out in the last couple of days. However, this isn't confirmed by users yet.

View solution in original post

5 Replies
FelicityRhone
New Contributor III

Oh yeah, and this also occurs in the older version of our app, using Xamarin Forms (5.0.0.2337) and Esri.ArcGISRuntime 100.15.2.

FelicityRhone
New Contributor III

I also wonder if this is connected to https://github.com/flutter/flutter/issues/139630 which people are saying might be an issue on Samsung's side? But if there's any kind of workaround that Esri or our team could implement that would be ideal.

0 Kudos
esp1rl
by
New Contributor III

I can report we're experiencing the same on Samsung devices.

TomášZachoval
New Contributor III

I also want to report this bug, on Samsung device. It often occurs after transitioning to the foreground.  After going to a new page and back when re-initializing the map view. The map view has started working again.

 

0 Kudos
aeldib
by
New Contributor

Esri has logged a bug for this issue:

BUG-000166099 Map view interactions freeze after returning to ArcGIS Maps SDK for .NET MAUI Android App on physical Samsung Galaxy devices with Android 14

As @FelicityRhone suggested, the issue is caused by a flutter/samsung bug.

The issue might be fixed in the Samsung's OneUI 6.1 patch, which should have been rolling out in the last couple of days. However, this isn't confirmed by users yet.