Technical
Handling Google Play Target API Level Updates in TWAs
October 8, 2026 · 7 min read
Google Play enforces strict target API level requirements to ensure that all apps published on the store adhere to the latest security, privacy, and performance standards of the Android operating system. Each year, Google mandates that new apps and app updates must target a recent major Android version. For developers running a Progressive Web App (PWA) within a Trusted Web Activity (TWA), understanding how these target API updates affect their wrapper application is critical to avoiding compliance rejections or visibility loss in the store.
While the core of your application's logic resides on your web server, the native Android wrapper that initiates the TWA must be updated periodically to match Google's evolving requirements.
Understanding Android SDK Version Properties
Every Android app configuration contains three primary SDK definitions in its build files. Understanding the distinction between these parameters is key to managing a TWA wrapper:
- Minimum SDK (minSdkVersion): The lowest version of Android that your app can run on. For TWAs, this is generally set to API 19 (Android 4.4) or API 21 (Android 5.0) to ensure compatibility with older devices.
- Compile SDK (compileSdkVersion): The version of the Android SDK APIs that the compiler uses to build your application. It determines which Java/Kotlin APIs are accessible during compile time.
- Target SDK (targetSdkVersion): The version of Android for which your app was designed and tested. This flag tells the operating system to enable behavioral changes and security enforcements introduced in that specific Android release.
The Yearly Target SDK Update Cycle
Google typically requires that by August 31st of each year, all new apps and updates must target the latest major Android version (usually the API level released the previous year). Existing apps that do not receive updates must remain within one target API level of the latest release, or they will stop being discoverable to new users running newer Android versions on the Google Play Store.
For TWA developers, failing to update the wrapper's targetSdkVersion means you will be blocked from uploading new versions of your app to the Play Console, and eventually, your app will be hidden from users with modern devices.
How to Update the Target SDK in Your TWA Project
To update your TWA wrapper to meet the current Google Play requirements, you must edit the application-level Gradle build file. This is usually located at /app/build.gradle in your project repository.
Locate the android block and update both the compileSdkVersion and the targetSdkVersion. For example, to target Android 14 (API level 34), modify the values as follows:
android {
compileSdkVersion 34
defaultConfig {
applicationId "com.example.twa"
minSdkVersion 21
targetSdkVersion 34
versionCode 2
versionName "1.1"
}
}
Additionally, you must update the dependencies block to ensure you are using the latest version of the AndroidX Browser library, which provides the underlying TWA implementation:
dependencies {
implementation 'androidx.browser:browser:1.8.0'
}
Key Platform Changes Impacting TWAs
Because the heavy lifting of rendering, caching, and network operations in a TWA is managed directly by the system browser (such as Chrome), web developers are shielded from many native Android API changes. However, certain security and lifecycle modifications introduced in recent SDK upgrades do impact the native wrapper wrapper container directly.
1. Android 13 (API 33) Runtime Notification Permissions
Prior to Android 13, apps did not require explicit runtime permission to show push notifications. If your TWA wrapper targets API 33 or higher, the native application itself must request the android.permission.POST_NOTIFICATIONS permission. Even if your web application requests notification permission via JavaScript, Chrome delegates this request to the containing TWA's permissions. You must ensure your AndroidManifest.xml declares this permission:
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
2. Android 14 (API 34) Foreground Service Types
If your TWA wrapper utilizes background services (for example, to manage background synchronization or audio playback), Android 14 requires that you specify a precise foreground service type (foregroundServiceType) in your manifest declaration. Failing to do so will result in an immediate runtime crash when running on Android 14 devices.
3. Android 15 (API 35) Edge-to-Edge Execution
When targeting API 35, apps are rendered edge-to-edge by default. This means the system status bar and navigation bar may overlay your TWA content unless your layout configuration explicitly accounts for system windows and insets. Developers must verify that their web layouts use CSS environment variables like safe-area-inset-top to prevent UI elements from slipping behind system bars.
Target API Reference Table
Use the following reference table to align your development roadmap with Google Play deadlines:
| Android Version | API Level | Google Play Deadline (New Apps) | Google Play Deadline (Updates) |
|---|---|---|---|
| Android 12 | 31 | August 2022 | November 2022 |
| Android 13 | 33 | August 2023 | November 2023 |
| Android 14 | 34 | August 2024 | November 2024 |
| Android 15 | 35 | August 2025 | November 2025 |
Testing and Validation Checklist
Once you have upgraded your targetSdkVersion, perform the following validation steps before generating your final production AAB:
- Verify Digital Asset Links: Ensure that the new build's certificate SHA-256 fingerprint matches the configuration hosted in your web server's
/.well-known/assetlinks.jsonfile. - Test on Emulators: Launch the app on an Android emulator matching the target API level to confirm there are no startup crashes or rendering issues with system bars.
- Review Runtime Permissions: Check that permissions such as camera, geolocation, or notifications prompt correctly and do not silently fail.
By keeping your TWA wrapper updated to the latest Android SDK target, you ensure maximum compatibility with modern hardware, retain high visibility on the Google Play Store, and maintain access to the latest security features offered by the platform.
Ready to ship your Android app?
Paste your PWA URL, get a signed APK and a Google Play ready AAB in minutes.
Build my app