mapbox-gl-native-android icon indicating copy to clipboard operation
mapbox-gl-native-android copied to clipboard

Android 11 - Q&A

Open tobrun opened this issue 5 years ago • 0 comments

Android 11 is around the corner, Google is releasing the final version on 8th of September. This issue tracks validating our SDK on this next iteration of Android as documenting any breaking changes that targeting Android 11 will bring. We won't be bumping our internally target SDK at this time as we don't want to force any new SDK versions to our users.

targetSdkVersion/compileSdkVersion = 30

Q&A validation by bumping our target/compile SDK version to 30 and running on an Android R emulator hasn't shown any breaking changes at compile or runtime for our SDK. There are two side notes worth calling out:

  • telemetry dependency was updated to support Android 11. TelephonyManager.getNetworkType() now requires READ_PHONE_STATE permission, this was patched in version v6.1.0 and is the required minimum version to support Android R. More information about this issue in https://github.com/mapbox/mapbox-events-android/issues/482 and it's resolution in https://github.com/mapbox/mapbox-events-android/pull/492
  • internal test application: was facing a compilation issue as the paramerers of Activity#onSaveInstanceState(outState: Bundle?, outPersistentState: PersistableBundle?) have become non-null, this requered a change in signature. See https://github.com/mapbox/mapbox-gl-native-android/pull/539 for more information.

Behaviorial changes

Behavior changes when targeting SDK version 30 are officially documented here. While none of these changes impact the usage of our SDK directly, it worth pointing out that Scoped storage enforcement will limit the usage of the map local file source to the application specific directories on the file system. Users can hook into this feature by providing URIs that starts with "file://" to load resources from the local file system.

cc @mapbox/maps-android

tobrun avatar Aug 25 '20 10:08 tobrun