Sdk Android 10 May 2026
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> Request both in runtime (if needed). Note that background location is considered dangerous and requires justification. You can no longer access Build.getSerial() and IMEI (TelephonyManager.getDeviceId()) without special carrier permissions.
While privacy changes get headlines, Android 10 also adds powerful developer-facing features. 3.1 Dark Mode (Night Mode) Android 10 offers a system-wide dark theme. Your app can adapt automatically or override.
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 sdk android 10
adb shell sm set-isolated-storage on Then run your app. See what breaks. Android Studio 4.0+ includes Database Inspector and Background Task Inspector to verify that your work manager, services, and alarms behave correctly under Android 10 restrictions. Part 5: Common Migration Pitfalls (and Solutions) | Pitfall | Symptom | Solution | |--------|---------|----------| | FileNotFoundException on external storage | openFileOutput fails for paths like /sdcard/Pictures/... | Migrate to MediaStore or SAF | | Location works once, then stops | Location only works when app is open | Request ACCESS_BACKGROUND_LOCATION and justify to user | | AlarmManager doesn't fire | Background alarms delayed or ignored | Use WorkManager or setExactAndAllowWhileIdle() | | Activity launches from service crash | Activity not started log | Replace with high-priority notification + PendingIntent | | Serial number returns "unknown" | Build.getSerial() returns null | Use android_id or request READ_PHONE_STATE (not recommended) | Part 6: Publishing for Android 10 (API Level 29) From November 2020 (Google Play requirement), all new apps and app updates had to target API level 29 or higher. As of 2025, targeting API 29 is the minimum for many store listings.
Example:
Moreover, learning Android 10's constraints (scoped storage, background limits) prepares you for Android 11–14, which tighten these rules further. The Android 10 SDK (API 29) represents a turning point in the Android ecosystem. It forces developers to respect user privacy, minimize background work, and adapt to modern storage models. While migrating can be painful – especially scoped storage – the result is a more secure, battery-efficient, and user-friendly app.
val uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues) resolver.openOutputStream(uri!!).use stream -> // write bitmap to stream <uses-permission android:name="android
<!-- res/values/styles.xml --> <style name="AppTheme" parent="Theme.AppCompat.DayNight"> <!-- ... --> </style>