mapbox-android-demo icon indicating copy to clipboard operation
mapbox-android-demo copied to clipboard

Adding try/catch to SnapshotNotificationActivity to catch IllegalStateException

Open langsmith opened this issue 6 years ago • 0 comments

Resolves https://github.com/mapbox/mapbox-android-demo/issues/1136 by adding a try/catch to fix a crash. I was able to reproduce the crash by quickly tapping the map twice. The second tap throws the exception because the MapSnapshotter is already created and in the process of creating the snapshot.

The exception from MapSnapshotter.java is now printed to the logcat and a cleaner message is displayed in a Toast.

cc @JoelNieman

langsmith avatar Oct 01 '19 20:10 langsmith