Example:
Request READ_EXTERNAL_STORAGE / WRITE_EXTERNAL_STORAGE → access all shared files. sdk android 10
Use Android ID (unique per app per user) or Instance ID . It wasn't just about dark mode; it introduced
Introduction Android 10 (API level 29), released in September 2019, marked a significant shift in Android's development philosophy. It wasn't just about dark mode; it introduced profound changes in privacy, security, storage, and device interaction. For developers, targeting or supporting Android 10 SDK means adapting to a new paradigm where user data is more protected, and background operations are strictly controlled. // write bitmap to stream
android compileSdkVersion 29 defaultConfig targetSdkVersion 29 minSdkVersion 21 // or your desired minimum // For non-AndroidX projects, you must migrate to AndroidX: // Add these lines to gradle.properties: // android.useAndroidX=true // android.enableJetifier=true
Use high-priority notifications or PendingIntent with notification to let the user trigger the UI. 2.3 Deprecation of onBackPressed() The onBackPressed() method is deprecated. You should now use OnBackPressedCallback for predictive back gestures (fully introduced later but started in API 29).
val uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues) resolver.openOutputStream(uri!!).use stream -> // write bitmap to stream