Closed Niach closed 1 year ago
Same on my side, cannot start the app again after closing it. You can check it using your own sample application.
How do you guys say closing it
? It works well at my end. (open <=> close)
Same, swipe the app away out of the recent apps(no explicit killing) and open it again -> infinite loop
I'm using it in a Fragment and did it like in your blog post:
public override void OnDestroyView()
{
mapView?.RemoveOnMapChangedListener(this);
mapView?.OnDestroy();
base.OnDestroyView();
}
@cschwengler On which device did you face the issue?
@Niach Have you faced the same issue on my sample?
Plz check device log where there are a lot of details for us to investigate deeper.
I didn't face any issues when closing app/opening app on simulator.
Cheers.
On a Oneplus 3 with Oxygen OS, Android 8.0
Hey,
I couldn't replicate your issue without more details.
Plz connect device and try to debug then get the logcat details.
Thanks.
Hey, i found whats going wrong. Its happening if you enabled the Mapbox TelemetryService. Maybe you disabled it on your testing device. If its enabled and you try to restart the app, it hangs.
I made a video of your sample app: https://www.youtube.com/watch?v=AZg2D2dGa7U After force-killing the app it works again, and if you disagree with the telemetry service it also works.
I think this is the problem: https://github.com/mapbox/react-native-mapbox-gl/issues/878 https://github.com/mapbox/react-native-mapbox-gl/issues/906 https://github.com/mapbox/react-native-mapbox-gl/issues/1023 Should got fixed with Mapbox 6.1.0
The problem seems to appear only on your xamain.forms sample and not in your android sample app. Maybe it has something to do with the Fragment?
Plz check back v6.4 now.
Hi Guys,
I have just tested v6.4, and the bug still exists. Start app (OK), close it by pressing device back button (app closes), click on the app icon again (BUG: app freezes). It happens by Xamarin Forms. Tested on Samsung Galaxy A5, Android 8.0.0.
After investigating this bug I found that calling Android.OS.Process.KillProcess(Android.OS.Process.MyPid()); in maprenderer after fragment = null; in dispose method it "solves" the problem, the app can be re-started successfully. I don't feel it a bugfix of course, it seems a brutal "solution", but hopefully can lead to the fix by pointing out it can be some lifecycle / fragment dispose related problem.
When you open app by tapping a push message on Android, app start also hangs if there is a MapBox map on the start page of the app. In this case it does not matter how you closed it before, so a simple home button pressing close also can lead to this error. Samsung Galaxy A5, Android 8.0.0.
App freezes due to fragment dispose related problem. This issue occur in Xamarin Forms. I tried not using fragment and follow the same approach like what amay077 did in Xamarin.Forms.GoogleMaps in creating the view that can be found in this link https://github.com/amay077/Xamarin.Forms.GoogleMaps/blob/master/Xamarin.Forms.GoogleMaps/Xamarin.Forms.GoogleMaps.Android/MapRenderer.cs#L119 and it solves the problem.
If you swipe the app away in the recent apps, you cannot start the app again and it is stuck in the splashscreen. I think maybe the mapbox service is not closed and prevents the mainactivity to start again. This behaviour also occures in the sample app.