现在在android 5

Welcome to Now in Android, your ongoing guide to what’s new and notable in the world of Android development.

欢迎使用Android Now,这是您持续不断的有关Android开发领域新事物和着名指南。

范围存储样本 (Scoped Storage Sample)

Image for post
Using the right permissions and the MediaStore APIs allows your Android 10 app to browse content created by other apps.
使用正确的权限和MediaStore API,您的Android 10应用可以浏览其他应用创建的内容。

One of the important changes in Android 10 is Scoped External Storage. This is one of the changes made in recent releases to help protect user data, by restricting the amount of access that apps have to files that they didn’t create.

Android 10的一项重要更改是“ 作用域外部存储” 。 这是最近发行版中所做的更改之一,它通过限制应用程序对未创建文件的访问权限来帮助保护用户数据。

Briefly: an app can always access its own files without permissions. But if it wants access to photo/video/audio files created by other apps, it has to use the READ_EXTERNAL_STORAGE permission. For other file types, it must use the Storage Access Framework to get the user involved in selecting files.

简而言之:应用程序始终可以在没有权限的情况下访问其自己的文件。 但是,如果要访问其他应用程序创建的照片/视频/音频文件,则必须使用READ_EXTERNAL_STORAGE权限。 对于其他文件类型,它必须使用Storage Access Framework来吸引用户参与选择文件。

The documentation covers the APIs and approaches available for dealing with external storage files. But the explanation is… not necessarily obvious, especially for people new to storage development. We’re working on clearing that up, but in the meantime, Nicole Borrelli created a MediaStore sample in the Storage Samples project on Github to help.

文档涵盖了可用于处理外部存储文件的API和方法。 但是解释并不一定……显而易见,特别是对于刚接触存储开发的人们。 我们正在努力解决这一问题,但与此同时, Nicole Borrelli在Github上的Storage Samples项目中创建了MediaStore示例以提供帮助。

The sample takes you through the process of using the correct permissions to request access to files, and then the appropriate MediaStore APIs to actually load them.

该示例指导您完成使用正确权限请求访问文件的过程,然后使用适当的MediaStore API实际加载它们。

Kotlin Codelabs (Kotlin Codelabs)

Image for post

You’ve heard about this Kotlin thing, but you’ve been wondering how to get started. Have I got some codelabs for you….

您已经听说过有关Kotlin的事情,但是您一直想知道如何开始。 我有适合您的代码实验室吗?

We already offered courses on Udacity for learning Kotlin and Android development in Kotlin. But maybe you prefer more self-paced learning. Or perhaps you just don’t watch videos. Well, it’s your lucky Kotlin day: we’ve taken the core content from those courses and produced a couple of codelab courses.

我们已经提供了有关Udacity的课程,用于学习Kotlin的KotlinAndroid开发 。 但也许您更喜欢自定进度的学习。 也许您只是不看视频。 好吧,这是您Kotlin幸运的一天:我们从这些课程中获取了核心内容,并制作了一些Codelab课程。

Kotlin Bootcamp for Programmers is a course (series of codelabs) that takes you through much of the basics of the language. It assumes you are familiar with object-oriented programming already, and introduces you to Kotlin concepts like the functions, classes, and lambdas.

Kotlin Bootcamp for Programmers是一门课程(一系列代码实验室),它将带您学习该语言的许多基础知识。 它假定您已经熟悉了面向对象的编程,并向您介绍了Kotlin的概念,例如函数,类和lambda。

Android Kotlin Fundamentals is another course (series of codelabs) that uses Kotlin to teach many of the important concepts in Android development. This includes some of the basics of Android, like layouts and lifecycles, but also includes modern practices that all Android developers should learn and use, like RecyclerView and Architecture Components. This course doesn’t explicitly teach Kotlin, so you might want to start with the Kotlin Bootcamp course if you haven’t used the language yet.

Android Kotlin基础知识是另一门课程(一系列代码实验室),使用Kotlin讲授Android开发中的许多重要概念。 这包括Android的一些基础知识,例如布局和生命周期,还包括所有Android开发人员应学习和使用的现代实践,例如RecyclerView和Architecture Components。 该课程并未明确教授Kotlin,因此,如果您还没有使用过Kotlin训练课程,则不妨先从中学习。

Android开发者峰会:直播 (Android Dev Summit: The Livestream)

Image for post

One of the great things about Google’s developer conferences in the past few years is that you don’t have to be physically present to enjoy the content. If you couldn’t make it to the event, you can still catch all of the sessions online.

在过去的几年中,Google开发者大会的一大优点是您不必亲自出席即可欣赏内容。 如果您无法参加活动,您仍然可以在线观看所有会议。

For example, the upcoming Android Dev Summit on October 23–24 will livestream all of the sessions on YouTube and Twitter. So not only can you watch the conference from the comfort of your own couch office, you can do it at the same time as everyone else throughout the world, all learning and enjoying the content simultaneously.

例如,即将在10月23日至24日举行的Android开发者峰会将在YouTube和Twitter上直播所有会议。 因此,您不仅可以在自己的沙发办公室里舒适地观看会议,而且可以与世界各地的所有人同时观看会议,同时学习和欣赏会议内容。

You can read more about the event and the livestream on the Android Dev Summit site and sign up for email updates on the event.

您可以在Android Dev Summit网站上了解有关活动和直播的更多信息,并注册该活动的电子邮件更新

接着… (Now then…)

That’s it for this time. Go play with external scoped storage for Android 10! Learn Kotlin and Android fundamentals! Plan to watch the Android Dev Summit livestream! And come back here soon for the next update from the Android developer universe.

这次就是这样。 玩Android 10的外部作用域存储 ! 了解KotlinAndroid基础知识! 计划观看Android Dev Summit直播! 并很快返回此处,以获取Android开发人员环境的下一个更新。

翻译自: https://medium.com/androiddevelopers/now-in-android-5-12ddd1f5e3bd

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值