Today we’re happy to announce aDeveloper Previewof the N release of Android! We’re doing something a little different this year by releasing the preview early… really early. By releasing a “work in progress” build earlier in development, we have more time to incorporate developer feedback. Also, the earlier preview allows us to hand off the final N release to device makers this summer, so they can get their hands on the latest version of Android earlier than ever. We’re looking forward to getting your feedback as you get your apps ready for N.

Here are a few APIs and features we want to highlight which are available as a part of the Android N Developer Preview today, with more to come as we continue developing the release:

Multi-window- A new manifest attribute calledandroid:resizableActivityis available for apps targeting N and beyond. If this attribute is set to true, youractivity can be launched in split-screen modeson phones and tablets. You can also specify your activity's minimum allowable dimensions, preventing users from making the activity window smaller than that size. Lifecycle changes for multi-window are similar to switching from landscape to portrait mode: your activity can handle the configuration change itself, or it can allow the system to stop the activity and recreate it with the new dimensions. In addition, activities can also go into picture-in-picture mode on devices like TVs, and is a great feature for apps that play video; be sure to setandroid:supportsPictureInPictureto true to take advantage of this.

Direct reply notifications:TheRemoteInputnotification API, which was originally added for Android Wear, now works in N for phones and tablets. Using theRemoteInputAPI enables users to reply to incoming message notifications quickly and conveniently, without leaving the notification shade. Learn morehere.

Bundled notifications- With N, you can use theNotification.Builder.setGroup()method to group notifications from the same app together - for example individual messages from a messaging app. Grouped notifications can be expanded into individual notifications by using a two-finger gesture or tapping the new expansion button. Learn morehere.

Efficiency- We launched Doze in Marshmallow to save battery when your device is stationary. In N, Doze additionally saves battery whenever the screen turns off. If you’ve already adapted your app for Doze, e.g. by using the GCM high priority message for urgent notifications, then you’re set; if not,here’s how to get started. Also, we’re continuing to invest in Project Svelte, an effort to reduce the memory needs of Android so that it can run on a much broader range of devices, in N bymaking background work more efficient. If you use JobScheduler for background work, you’re already on the right track. If not, N is a good time to make that switch. And to help you out, we’re making JobScheduler even more capable, so now you can useJobSchedulerto react to things like changes to content providers.

Improved Java 8 language support- We’re excited to bring Java 8 language features to Android. With Android'sJack compiler, you can now use many popular Java 8 language features, including lambdas and more, on Android versions as far back as Gingerbread. The new features help reduce boilerplate code. For example, lambdas can replace anonymous inner classes when providing event listeners. Some Java 8 language features --like default and static methods, streams, and functional interfaces -- are also now available on N and above. With Jack, we’re looking forward to tracking the Java language more closely while maintaining backward compatibility.

Get started

The N Developer Preview includes an updated SDK with system images for testing on the official Android emulator and on Nexus 6, Nexus 5X, Nexus 6P, Nexus Player, Nexus 9, and Pixel C devices (and to help test out these features on a tablet, developers can get a$150 discount on Pixel C), as well as on General Mobile 4G (Android One) devices.

This initial preview release is for developers only and not intended for daily use or consumer use. We plan to update the N Developer Preview system images often during the Developer Preview program. As we get closer to a final product, we’ll be inviting consumers to try it out as well.

We are also making it easier for you to try out N on your development devices with the new Android Beta Program. Starting today, you can update your Android devices to the developer preview of N and receive ongoing updates via OTA by visitingg.co/androidbeta.

Clickherefor more details on getting started with the N Developer Preview andlet us know what you think-- the sooner we hear from you, the more of your feedback we can integrate.

今天我们很高兴地宣布一个开发者预览版的Android的N个版本的!我们正在做的事情,今年早期发布的预览有一点不同...真早。通过释放“进展中的工作”建设较早发展,我们有更多的时间来整合开发者的反馈。此外,早期预览使我们在今年夏天手头宽裕最终氮素释放到设备制造商,这样他们就可以早于以往任何时候都得到他们的手在Android的最新版本。我们期待着得到您的反馈,你让你的应用程序准备N.

这里我们要强调几个API和功能,它们可作为Android的ñ开发者预览版的一部分的今天,更多的来,我们将继续开发版本:

多窗口-新清单属性称为机器人:resizableActivity可以应用定位N和超越。如果这个属性被设置为true,你的活动可以在分屏模式推出手机和平板电脑。你也可以指定你的活动的最小允许尺寸,防止用户进行活动的窗口比尺寸更小。用于多窗口的生命周期的变化是相似的从横向切换到纵向模式:你的活动可以处理的配置变化本身,或者它可以允许系统以停止活动,并用新的尺寸重新创建它。另外,活动,也可以进入子母画面模式像电视设备,是播放视频的应用一个很大的特点;一定要设置的android:supportsPictureInPicture要真正利用这一优势。

直接回复通知:RemoteInput通知API,它最初是增加了对Android Wear,现在工作以N为手机和平板电脑。使用RemoteInputAPI使用户能够方便快捷地回复收到的消息通知,不留通知窗帘。了解更多在这里。

捆绑通知-与N,您可以使用Notification.Builder.setGroup()从消息应用程序,例如个人信息-从相同的应用程序一起的方法组的通知。分组通知可以通过使用双指手势或点击新的扩展按钮,可以扩展到个人的通知。了解更多在这里。

效率-我们推出打盹的棉花糖当你的设备是固定的,以节省电池。在N,打盹另外,每当屏幕关闭可节省电池。如果您已经调整您的应用程序承泽,例如使用的紧急通知的GCM高优先级消息,那么你设置;如果没有,这里是如何开始。此外,我们将继续投资于项目斯维尔特,努力降低Android版 ​​的内存需求,以便它可以通过在更广泛的设备上运行,以N使得后台的工作更加高效。如果您使用的jobscheduler背景的工作,你已经在正确的轨道上。如果不是,N是一个很好的时间,使该交换机。并帮助你,我们正在做的jobscheduler更显干练,所以现在你可以使用的jobscheduler对事物的反应就像更改内容提供商。

改进的Java 8语言的支持-我们很高兴能带来的Java 8语言特性到Android。随着Android的杰克编译器,你现在可以使用许多流行的Java 8语言功能,包括lambda表达式多,在Android版 ​​本早在姜饼。这些新功能有助于减少样板代码。例如,lambda表达式可以提供事件侦听器时更换匿名内部类。一些Java 8语言特性--like默认和静态方法,流和功能接口-现在也可在N及以上的。与杰克,我们期待着跟踪Java语言更加紧密,同时保持向后兼容性。

上手

N个开发者预览版包括与系统映像进行测试官方Android模拟器,并在Nexus 6的Nexus 5X的Nexus 6P的Nexus播放机,Nexus 9及像素C器件更新的SDK(并帮助测试出在平板电脑上这 ​​些功能,开发者可以得到一个在像素C $ 150的折扣通用移动4G(Android的一体机)设备),以及。

这个最初的预览版是开发人员,而不是只适用于日常使用,或消费者使用。我们计划在开发者预览版节目中经常更新N开发者预览版系统映像。随着我们越来越接近最终产品,我们将邀请消费者尝试一下为好。

我们还使它更容易让你尝试了N于用新的Android测试版程序开发的设备。从今天开始,你可以更新你的Android设备N的开发者预览版,并通过访问通过OTA获得持续的更新g.co/androidbeta。

请点击这里了解更多详情使用入门的N个开发者预览版,并让我们知道您的想法-我们越早收到你的来信,您的反馈,我们可以整合更多。


更多相关文章

  1. Android(安卓)Training - 使用IntentService执行任务(Lesson 3 -
  2. Android自定义属性,format
  3. Android(安卓)SpannableString使用例子
  4. Android(安卓)ProgressDialog的使用
  5. Android中一直走马灯效果的TextView
  6. 【Android】编译CM10遇到的错误解决方案
  7. 箭头函数的基础使用
  8. NPM 和webpack 的基础使用
  9. Python list sort方法的具体使用

随机推荐

  1. Android(安卓)获取存储信息
  2. android UI适配简单记录二
  3. Android(安卓)复制单个文件到指定目录,And
  4. android 获取包名的两种方式
  5. 提升基于英特尔® 架构的 Android* 模拟
  6. android应用程序设置全屏
  7. [置顶] Android学习进阶路线导航线路(And
  8. Android中贪吃蛇游戏的学习(四)
  9. [置顶] Android开发之ScrollView去掉右侧
  10. 2011.07.18——— android AlphaBitmap