Google 近日发布了 Android 13 的首个 Beta 测试版本,也正式宣告 Android 13 已走出开发者预览阶段。虽说现在马上就到五月份了,但首个 Beta 版本还是赶上了此前官方开发进度时间轴中所预期的时间表。Google recently released the first beta test version of Android 13 and officially announced that Android 13 has stepped out of the developer preview stage. Although it’s almost May now, the first beta version has caught up with the schedule previously expected in the official development progress timeline.
Android 13 Development Progress Timeline What’s New in Android 13 Beta 1 Beta 1 includes the latest updates to features previously announced by Google in the developer preview, such as new notification permissions, photo picker, themed app icons, improved localization And language support, etc. On this basis, Android 13 Beta 1 also introduces a small number of new features.
Media file access permissions are more granular: Previously, when an application wanted to read shared media files in local storage, it needed to apply for the READ_EXTERNAL_STORAGE permission, which allowed access to all types of media files. To bring more transparency and control to users, we will introduce a new set of permissions with a more granular scope when accessing shared media files.
With the new permission, apps can now request access to certain types of files in shared storage: READ_MEDIA_IMAGES (for images and photos)
READ_MEDIA_VIDEO (for video)
READ_MEDIA_AUDIO (for audio files)
When the user grants the permission, the application will have read permission for the corresponding media file type. To simplify the user experience, if an application requests both READ_MEDIA_IMAGE and READ_MEDIA_VIDEO, the system displays a dialog that grants both permissions.
Better error reporting in Keystore and KeyMint: Keystore and KeyMint now provide more detailed and accurate error indications for apps that generate keys. Google has added a hierarchy of exception classes under java.security.ProviderException with Android-specific exceptions, including Keystore/KeyMint error codes, and whether the error can be retried. You can also modify the key generation, signing and encryption methods to throw new exceptions. Improved error reporting should now give you the relevant information you need to retry key generation.
Predictive audio routing: To help media applications determine how their audio will be routed, Google has added a new audio routing API to the AudioManager class. The new getAudioDevicesForAttributes() API allows you to retrieve a list of devices that may be used to play a given audio, and Google has also added the getDirectProfilesForAttributes() API to help you find out if your audio stream is playable directly. Use these new APIs to determine the best AudioFormat to use for your audio track.
For more details, please check: https://android-developers.googleblog.com/2022/04/android-13-beta-1-blog.html

Android 13 开发进度时间轴

Android 13 Beta 1 的新内容

Beta 1 包括了 Google 之前在开发者预览版中宣布的功能的最新更新,如新的通知权限、照片选择器、主题应用图标、改进的本地化和语言支持等,在此基础上,Android 13 Beta 1 还引入了少量的新功能。

媒体文件访问的权限更加细化:

以前,当一个应用程序想要读取本地存储中的共享媒体文件时,它需要申请 READ_EXTERNAL_STORAGE 权限,该权限可以访问所有类型的媒体文件。为了给用户带来更多的透明度和控制权,我们将引入一套新的权限,在访问共享媒体文件时有更细化的范围。

有了新权限,应用现在可以请求访问共享存储中特定类型的文件:

  • READ_MEDIA_IMAGES(用于图像和照片)
  • READ_MEDIA_VIDEO(用于视频)
  • READ_MEDIA_AUDIO(对于音频文件)

当用户授予权限时,应用程序将拥有对相应媒体文件类型的读取权限。为了简化用户的体验,如果一个应用程序同时请求 READ_MEDIA_IMAGEREAD_MEDIA_VIDEO,系统会显示一个授予两种权限的对话框。

Keystore 和 KeyMint 中更好的错误报告:

对于生成密钥的应用,Keystore 和 KeyMint 现在提供了更详细准确的错误指示。Google 在 java.security.ProviderException 下添加了一个异常类层级,其中有 Android 特有的异常,其中包括 Keystore/KeyMint 错误代码,以及错误是否可以重试。你也可以修改密钥生成、签名和加密的方法来抛出新的异常。改进的错误报告现在应该给你提供你所需要的相关信息来重试密钥生成。

预见性音频路由:

为了帮助媒体应用程序确定他们的音频将如何被路由,Google 在 AudioManager 类中增加了新的音频路由 API。新的 getAudioDevicesForAttributes() API 允许你检索可能用于播放指定音频的设备列表,Google 还添加了 getDirectProfilesForAttributes() API 来帮助你了解你的音频流是否可以直接播放。使用这些新的 API 来确定为你的音轨使用的最佳 AudioFormat

更多详情可查看:https://android-developers.googleblog.com/2022/04/android-13-beta-1-blog.html

发表评论

后才能评论