Map is freezed when switching back to the app on Android 14

496
4
02-04-2024 11:12 PM
EirikH
by
New Contributor III

I'm wondering if this is something with our specific app or not so I'm reaching out here to see if anyone else has seen this.

On devices with Android 14 we are seeing that if you have our app open with the map visible, switch to another app for minimum 10-15s (without fully closing our app), and then go back to our app, you can't interact with the map anymore (can't pan, click, zoom). If you rotate the device so it re-renders, things are back again.

We are running 100.15.1 in production, and it is also happening with 100.15.4. It is not happening with the iOS version of our app.

Edit: It's worth mentioning that other UI elements in our app (e.g. buttons on top of the map) work after switching back to the app, it's just the map that doesn't accept interactions anymore.

Edit2: We haven't been able to reproduce in simulator thus far, only on physical devices.

4 Replies
EirikH
by
New Contributor III

As a workaround we are listening on app state changes (inactive/background vs active) and once it is active again we manually force it to update:

 

 mapview.pause();
 mapview.resume();
 mapview.invalidate();

 

PS: It might be that mapview.invalidate() is enough, but haven't verified that on all applicable devices yet.

 

0 Kudos
FelicityRhone
New Contributor III

I am running into the same issue - not just you! I'm using the ArcGIS Runtime for Xamarin Forms (seeing this in 100.15.2) - I wasn't able to get your workaround working in my app 😞

Update: I was able to get the workaround sort-of working using reflection to call Pause/Resume (in a custom MapViewRenderer for Android). It makes the map render properly for panning/zooming, but when I have geolocation on it crashes the app with a SIGSEGV when the geolocation pulse tries to draw.

Tags (1)
0 Kudos
FelicityRhone
New Contributor III

Esri posted an update on another post which I think would apply here too:
https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/140...

0 Kudos
EirikH
by
New Contributor III

Thanks for the update @FelicityRhone 

0 Kudos