mapbox-android-demo
mapbox-android-demo copied to clipboard
Adding try/catch to SnapshotNotificationActivity to catch IllegalStateException
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