meet.google.com api

  • Google Play
  • Guides

Meet Google Play's target API level requirement

When you upload an APK, it needs to meet Google Plays target API level requirements. New apps and app updates must target Android 10 (API level 29) or higher; except for Wear OS apps, which must target API level 28 or higher.

Starting in August 2021, new apps will need to:

  • Publish with the Android App Bundle format.
  • Use Play Asset Delivery or Play Feature Delivery to deliver assets or features that exceed download size of 150MB. Expansion files (OBBs) will no longer be supported for new apps.
  • Target API level 30 (Android 11) or above and adjust for behavioral changes; except Wear OS apps, which must continue to target API level 28 or higher.

Starting in November 2021, app updates will be required to target API level 30 or above and adjust for behavioral changes in Android 11. Existing apps that are not receiving updates are unaffected and can continue to be downloaded from the Play Store. Wear OS apps must continue to target API level 28 or higher.

The switch to Android App Bundle delivery will also impact instant experiences using the legacy Instant app ZIP format. From August 2021, new instant experiences and updates to existing instant experiences will be required to publish instant-enabled app bundles.

Why target newer SDKs?

Every new Android version introduces changes that bring significant security and performance improvements as well as enhance the user experience of Android overall. Some of these changes only apply to apps that explicitly declare support through their targetSdkVersion manifest attribute (also known as the target API level).

Configuring your app to target a recent API level ensures that users can benefit from these improvements, while still allowing it to run on older Android versions. Targeting a recent API level also allows your app to take advantage of the platform's latest features to delight your users. Furthermore, as of Android10 (API level 29), users see a warning when starting an app for the first time if the app targets Android 5.1 (API level 22) or lower.

This document highlights important points you need to know in updating your target API level to meet the Google Play requirement.

Note: If your Gradle file contains manifest entries, you can confirm or change the current value of targetSdkVersion in your app's Gradle file, as described in Configure your build. Alternatively, you can use the android:targetSdkVersion attribute in the manifest file, as described in the documentation for the manifest element.

Migrate from Android 10 (API level 29) to Android 11 (API level 30)

  • Privacy
  • Scoped storage enforcement: Apps should adopt the scoped storage model where app-specific, media, and other file types are saved and accessed using dedicated locations.
  • Permissions auto-reset: If users haven't interacted with an app for a few months, the system auto-resets the app's sensitive permissions. This shouldn't affect most apps. If your app primarily works in the background without user interactions, you may consider requesting users to disable auto reset.
  • Background location access: Apps must request foreground and background location permission separately. Granting access to background location permission can only be done in app settings instead of runtime permission dialogs.
  • Package visibility: When an app queries for the list of installed apps and services on the device, the returned list is filtered.
  • If you use Text-To-Speech or Speech Recognition services, you will need to add elements for services to the manifest file.
  • Security
  • Compressed resource.arsc files are no longer supported.
  • APK Signature Scheme v2 now required. For backward compatibility reasons, developers should also continue to sign with APK Signature Scheme v1.
  • Non-SDK interface restriction. Using non-SDK interfaces is not recommended for apps targeting API level 30, as some of these non-SDK interfaces are now blocked. See Non-SDK interfaces that are now blocked in Android 11 for a comprehensive list of blocked non-SDK interfaces.

For an exhaustive list of changes introduced in Android 11 (API level 30), see the Behavior Changes page.

Migrating from lower than Android 10 (API level 29)

Select the version of Android you will be migrating from:

Migrate to Android 5 (API level 21)

See the respective Behavior Changes page for each of the following releases to ensure your that your app has accounted for changes introduced in these releases:

  • Android 5.0 (API level 21)
  • Android 4.4 (API level 19).
  • Android 4.1.x (API level 16).

Continue by following the instructions in the next section.

Migrate to Android 6 (API level 23)

The following considerations apply to apps targeting Android 6.0 and higher versions of the platform:

Runtime Permissions

Dangerous permissions are only granted at runtime. Your UI flows must provide affordances for granting these permissions.

Wherever possible, ensure your app is prepared to handle rejection of permission requests. For example, if a user declines a request to access the device's GPS, ensure your app has another way to proceed.

For an exhaustive list of changes introduced in Android 6.0 (API level 23), see the Behavior Changes page for that version of the platform.

Continue by following the instructions in the next section.

Migrate to Android 7 (API level 24)

The following considerations apply to apps targeting Android 7.0 and higher versions of the platform:

Doze and App Standby

Design for behaviors described in Optimizing for Doze and App Standby, which encompasses incremental changes introduced across several platform releases.

When a device is in Doze and App Standby Mode, the system behaves as follows:

  • Restricts network access
  • Defers alarms, syncs, and jobs
  • Restricts GPS and Wi-Fi scans
  • Restricts normal-priority Firebase Cloud Messaging messages.

Permission Changes

  • The system restricts access to app private directories.
  • Exposing a file:// URI outside of your app triggers a FileUriExposedException. If you need to share files outside of your app, implement FileProvider

The system forbids linking to non-NDK libraries.

For an exhaustive list of changes introduced in Android 7.0 (API level 24), see the Behavior Changes page for that version of the platform.

Continue by following the instructions in the next section.

Migrate to Android 8 (API level 26)

The following considerations apply to apps targeting Android 8.0 and higher versions of the platform:

  • Background Execution Limits
  • The system restricts services for apps not running in the foreground.
  • startService() now throws an exception when an app tries to invoke it while startService() is prohibited.
  • To start foreground services, an app must use  startForeground() and startForegroundService().
  • Carefully review the changes made to the JobScheduler API, as documented on the Android 8.0 (API level 26) Behavior Changes page.
  • Firebase Cloud Messaging requires version 10.2.1 of the  Google Play services SDK, or higher.
  • When using  Firebase Cloud Messaging, message delivery is subject to background execution limits. When background work is necessary upon message receipt, such as to perform background data sync, your app should schedule jobs via Firebase Job Dispatcher or JobIntentService instead. For more information, see the Firebase Cloud Messaging documentation.
  • Implicit broadcasts
  • Implicit broadcasts are restricted. For information about handling background events, see the documentation for the  JobScheduler API.
  • Background Location Limits
  • Apps running in the background have limited access to location data.
  • On devices with Google Play services, use the  fused location provider to get periodic location updates.
  • Notification Channels
  • You should define  notification interruption properties on a per-channel basis.
  • You must assign notifications to a channel for the notifications to appear.
  • This version of the platform supports  NotificationCompat.Builder.
  • Privacy
  • ANDROID_ID is scoped per app signing key.

For an exhaustive list of changes introduced in Android 8.0 (API level 26), see the Behavior Changes page for that version of the platform.

Migrating from Android 8 (API 26) to Android 9 (API 28)

  • Power Management
  • App Standby buckets bring new background restrictions based on app engagement, such as deferred jobs, alarms and quotas on high-priority messages
  • Battery saver improvements increase the limitations on app standby apps
  • Foreground service permission
  • Need to request the normal permission FOREGROUND_SERVICE (not runtime permission)
  • Privacy changes
  • Limited access to background sensors
  • Restricted access to call logs, now in CALL_LOG permission group
  • Restricted access to phone numbers, requiring READ_CALL_LOG permission
  • Restricted access to Wi-Fi information

For an exhaustive list of changes introduced in Android 9.0 (API level 28), see behavior changes.

Migrating from Android 9 (API level 28) to Android 10 (API level 29)

  • Notifications with a full-screen intent
  • Need to request the normal permission USE_FULL_SCREEN_INTENT (not runtime permission).
  • Support for foldables and large screen devices
  • Multiple activities can now be in the "resumed" state at the same time, but only one actually has focus.
  • This change affects onResume() and onPause() behavior.
  • New lifecycle concept of "topmost resumed" which can be detected by subscribing to onTopResumedActivityChanged().
  • Only one activity can be "topmost resumed."
  • When resizeableActivity is set to false, apps can additionally specify a minAspectRatio which automatically letterboxes the app on narrower aspect ratios.
  • Privacy changes
  • Scoped storage
  • External storage access is limited only to an app-specific directory and to specific types of media that the app has created.
  • Restricted access to location while the app is in the background, requiring ACCESS_BACKGROUND_LOCATION permission.
  • Restricted access to non-resettable identifiers such as IMEI and serial number.
  • Restricted access to physical activity information such as the user's step count, requiring ACTIVITY_RECOGNITION permission.
  • Restricted access to some telephony, Bluetooth, and Wi-Fi APIs, requiring ACCESS_FINE_LOCATION permission.
  • Restricted access to Wi-Fi settings
  • Apps can no longer directly enable or disable Wi-Fi and need to do it using settings panels.
  • Restrictions on initiating a connection to a Wi-Fi network, requiring the use of either WifiNetworkSpecifier or WifiNetworkSuggestion.

Continue to update to API 30 by following the instructions in the previous section.

Modernizing your apps

As you update the target API level for your apps, consider adopting recent platform features to modernize your apps and delight your users.

  • Consider using CameraX, which is in Beta, to make the most of using the camera.
  • Use Jetpack components to help you follow best practices, free you from writing boilerplate code, and simplify complex tasks so that you can focus on the code you care about.
  • Use Kotlin to write better apps faster, and with less code.
  • Ensure you are following privacy requirements and best practices.
  • Add dark theme support to your apps.
  • Add gesture navigation support to your apps.
  • Migrate your app from Google Cloud Messaging (GCM) to the latest version of Firebase Cloud Messaging.
  • Take advantage of advanced window management.
  • Support larger aspect ratios (more than 16:9) to take advantage of recent advances in hardware. Ensure that your app resizes to fill the available screen space. Only declare a maximum aspect ratio as a last resort. For more information about maximum aspect ratios, see Declare Restricted Screen Support.
  • Add multi-window support to help your app increase productivity, and to manage multiple displays.
  • If a great minimized app experience would improve the user experience, add support for Picture-in-Picture functionality.
  • Optimize for devices with display cutout.
  • Do not assume status bar height. Instead, use WindowInsets and View.OnApplyWindowInsetsListener. Watch this video for an explanation.
  • Do not assume that the app has the entire window. Instead, confirm its location by using View.getLocationInWindow(), not View.getLocationOnScreen().
  • When handling MotionEvent, use MotionEvent.getX() and MotionEvent.getY(), not MotionEvent.getRawX(), MotionEvent.getRawY().

Check and update your SDKs and libraries

Make sure that your third-party SDK dependencies support API 29: Some SDK providers publish it in their manifest; others will require additional investigation. If you use an SDK that doesn't support API 29, make it a priority to work with the SDK provider to resolve the issue.

Additionally, note that your app or game's targetSdkVersion may restrict access to private Android platform libraries; see NDK Apps Linking to Platform Libraries for details.

You should also verify any restrictions that may exist in the version of the Android Support Library that you're using. As always, you must ensure compatibility between the major version of Android Support Library and your apps compileSdkVersion.

We recommend that you choose a targetSdkVersion smaller than or equal to the Support Librarys major version. We encourage you to update to a recent compatible Support Library in order to take advantage of the latest compatibility features and bug fixes.

Test your app

After you update your app's API level and features as appropriate, you should test some core use cases. The following suggestions are not exhaustive, but aim to guide your testing process. We suggest testing:

  • That your app compiles to API 29 without errors or warnings.
  • That your app has a strategy for cases where the user rejects permission requests, and prompts the user for permissions. To do so:
  • Go to your app's App Info screen, and disable each permission.
  • Open the app and ensure no crashes.
  • Perform core use case tests and ensure required permissions are re-prompted.
  • Handles Doze with expected results and no errors.
  • Using adb, place your test device into Doze while your app is running.
  • Test any use cases that trigger Firebase Cloud Messaging messages.
  • Test any use cases that use Alarms or Jobs.
  • Eliminate any dependencies on background services.
  • Set your app into App Standby
  • Test any use cases that trigger Firebase Cloud Messaging messages.
  • Test any use cases that use Alarms.
  • Handles new photos / video being taken
  • Check that your app handles the restricted ACTION_NEW_PICTURE and ACTION_NEW_VIDEO broadcasts correctly (that is, moved to JobScheduler jobs).
  • Ensure that any critical use cases that depend on these events still work.
  • Handles sharing files to other apps
  • Test any use case that shares file data with any other app (even another app by the same developer)
  • Test the content is visible in the other app and doesnt trigger crashes.

Further information

Opt in to emails in the Google Play Console so that we can send you important updates and announcements from Android and Google Play, including our monthly partner newsletter.    Previous              arrow_back               Design to drive conversions    Next              Support 64-bit architectures               arrow_forward

Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2021-10-12 UTC.  [{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]

Video liên quan