Multiple map view crash on android

Hello

I have an app with a map in 2 tabs of a tabbed page.
my crashlytics has reported multiple errors on android across many devices and the errors that come out of it look a little like this

java.lang.RuntimeException: Could not read input channel file descriptors from parcel.
[email protected]

or sometimes

android.view.InputChannel.nativeReadFromParcel
java.lang.RuntimeException: Could not read input channel file descriptors from parcel.

After digging about for a looooongs time i think i have figured out what the issue is, it seems to stem from a google map bug that is ongoing for years to do with having multiple instances of a map in the one fragment.

to fix this issue i took the maps out of the pages i wanted them on and instead named the parent container.
i then over rode the on appearing and dissapearing methods and on dissapearing i cleared the parent containers children and on appearing i added a static instance of the map which i had instanceiated on startup in the main App.xaml.cs class

This meant that there was only ever one instance of the map in memory and seems to have resolved the issue

just posting this in case anyone else comes across these issues

Sign In or Register to comment.