Android SDK Migration for Mobile App
Google Play as of August 31, 2024 requires new apps and updates to target minimum Android 14 (API 34). What was acceptable target a year ago—today blocks update publishing. SDK migration is not optional task, but mandatory work to keep app in Play Store.
But "raise targetSdkVersion in build.gradle"—that's not migration. That's start of diagnostics.
What Really Changes with Higher targetSdk
With each major Android release, Google adds behavioral changes that only take effect for apps with corresponding targetSdkVersion. Before the increase, app worked in "compatibility mode" and didn't see new restrictions.
API 33 (Android 13)—key changes:
- Split media permissions:
READ_EXTERNAL_STORAGEno longer grants access to photos and videos. NeedREAD_MEDIA_IMAGES,READ_MEDIA_VIDEO,READ_MEDIA_AUDIO. Code checking onlyREAD_EXTERNAL_STORAGE—stops working. -
POST_NOTIFICATIONS—new permission for showing notifications. Without explicit request, notifications don't display. Millions of apps were silently "broken" in push notifications after user updates. - Themed icons—
adaptive-iconwithmonochromelayer.
API 34 (Android 14)—key changes:
-
SCHEDULE_EXACT_ALARM—implicit grant removed. User must explicitly allow exact alarms. - Background activity more restricted—launching Activity from background without visible notification blocked.
-
JobSchedulerandWorkManager: new restrictions on launch frequency for certain foreground service types. -
android:exportedmandatory for all components with intent-filter.
API 35 (Android 15)—adds:
- Predictive Back gesture animation—
BackHandlerin Compose orOnBackPressedCallbackneed adaptation. - Health Connect API updated.
- Edge-to-edge enforced—app must correctly draw behind system bars.
Migration Process
First step—raise targetSdkVersion in gradle and run lint: ./gradlew lint. Lint outputs warnings about deprecated API and incompatible calls. Not complete list of problems—only statically detectable ones.
Second step—run app on emulator/device with target Android version and manually walk through all critical flows: auth, file uploads, notifications, background tasks, deeplinks. Some issues visible only at runtime.
Permissions—separate check: go through all ActivityCompat.requestPermissions() calls and ensure actualized permissions are requested. PermissionX or custom PermissionManager with mapping "what's needed → what to request depending on API level" simplifies multi-version support.
Foreground services with API 34 require type specification: foreground-service-type in manifest (camera, location, mediaPlayback, microphone, etc.). Without type—service won't launch.
Testing Before Publishing
Firebase Test Lab—testing on real devices with Android 14 without buying physical phones. Run basic Espresso smoke test on 5–10 devices from different manufacturers.
Play Console provides Pre-launch report—automatic APK testing before publishing with crash reports. Doesn't replace manual testing, but catches obvious issues.
Phased rollout after publishing: 5% → 20% → 50% → 100% monitoring ANR and crash rate in Play Console and Firebase Crashlytics.
Migrating one major SDK: 3–5 days for typical app. If target outdated by 2–3 versions—estimate doubles. Cost is calculated individually after app audit.







