Android is fairly unique in the ways it allows multiple applications to run at the same time.

android 使用十分独特的方式 允许多任务在同一时间运行.

Developers coming from a different platform may find the way it operates surprising.

开发者在不同的平台中发现这种方式会出现意想不到的事情.

Understanding its behavior is important for designing applications that will work well and integrate seamlessly with the rest of the Android platform.

了解这种行为在设计应用程序中十分重要,这样可以使程序运行的完美和无缝结合的保持在android平台中

This article covers the reasons for Android's multitasking design, its impact on how applications work, and how you can best take advantage of Android's unique features.

这篇文章展示的就是如何设计android程序的多任务,这紧紧的关系着应用程序是如何工作,和如何让你android程序拥有独特的高级特性.

Design considerations:设计的约束

Mobile devices have technical limitations and user experience requirements not present in desktop or web systems.

移动设备在技术上有着限制和用户体验需求不同于当前的桌面电脑和网络系统.

  • We did not want to require that users close applications when "done" with them. Such a usage pattern does not work well in a mobile environment, where usage tends to involve repeated brief contact with a wide variety of applications throughout the day.

  • 我们不想要求用户自行关掉程序.这样的习惯模式在手机的环境中不是很好,贯穿于一天当中的应用程序习惯趋向于反复简短的调用

  • Mobile devices don't have the luxury of swap space, so have fairly hard limits on memory use. Robert Love has a very good article covering the topic.

  • 移动设备没有丰富的交换空间,所以十分有限制的使用内存.Robert有一篇非常好的文章介绍这个主题.

  • Application switching on a mobile device is extremely critical; we target significantly less than 1 second to launch a new application. This is especially important when the user is switching between a few applications, such as switching to look at a new SMS message while watching a video, and then returning to that video. A noticeable wait in such situations will quickly make users hate you.

  • 在移动设备中应用程序的切换是十分苛刻的,我们的目标是尽量少于1s运行一个新的程序.当用户在少量程序之间切换是尤其的重要,例如,当用户在看视频的时候切换到短信管理器查看新的短信,然后,再回到看视频当中.一个显著的等待情形,将会使用户很快就讨厌你

  • The available APIs must be sufficient for writing the built-in Google applications, as part of our "all applications are created equal" philosophy. This means background music playback, data syncing, GPS navigation, and application downloading must be implemented with the same APIs that are available to third party developers.

  • 在构建的一个Google 应用程序现有的APIs必须充分的利用,作为我们”所有程序都是公平”哲学的一部分.这就意味着现有的一伙开发者在开发,后台播放音乐,数据同步,GPS导航,和应用程序的下载必须实现一样的APIs

The first two requirements highlight an interesting conflict.

有一个有趣的冲突在第一个条件和第二个条件.

We don't want users to worry about closing their apps, but rather make it appear that all of the applications are always running.

我们不想用户担忧如何关闭他们的程序,但是这样会出现所有程序都总是在运行当中.

At the same time, mobile devices have hard limits on memory use, so that a system will degrade or even start failing very quickly as it needs more RAM than is available; a desktop computer, with swap, in contrast will simply start slowing down as it needs to page RAM to its swap space.

在同一时间,移动设备只有十分有限的内存在使用,导致系统将会减慢或者甚至使一个需要很多空闲RAM的程序无法启动,

与之相比较,在桌面电脑中,同样使用交换空间,程序仅仅减慢启动速度,需要用到的交换空间由页面缓存代替.

These competing constraints were a key motivation for Android's design.

在android的程序设计中这些约束都是提升你程序性能的关键.

PS:翻译果然不是一件容易的事情…水平太渣了…有错误欢迎指正…估计就翻这段了…能力不足呀…

When does an application "stop"?:什么时候停止你的程序?

Explicitly running in the background:明确的运行在后台

The value of generic components:基础组件的价值

更多相关文章

  1. Android(安卓)SDK系统要求
  2. 我对android 软件栈了解
  3. AndroidMainfest.xml详解
  4. 第一个android应用程序
  5. Android数据存储---数据备份(Data Backup)(二)
  6. Android(安卓)NDK开发:NDK概览
  7. Android应用程序的权限列表
  8. android开发学习笔记(1)我的第一个android应用程序
  9. 谷歌Android被Linux内核除名

随机推荐

  1. Android(安卓)svg图片使用
  2. Android(安卓)模拟J2me 通过连接框架
  3. Android与服务器端数据交互(1)
  4. Android面试系列文章2018之Android部分之
  5. Android(安卓)Sensor传感器系统架构初探
  6. 为什么iOS比Android更吸引开发者
  7. 创建你的第一个Android(安卓)PHP应用
  8. Android(安卓)的 selector--背景选择器
  9. 穿越之旅之--android中如何执行java命令
  10. Android之进程与线程