Android4.4新特性的翻译和笔记.pdf_第1页
Android4.4新特性的翻译和笔记.pdf_第2页
Android4.4新特性的翻译和笔记.pdf_第3页
Android4.4新特性的翻译和笔记.pdf_第4页
Android4.4新特性的翻译和笔记.pdf_第5页
已阅读5页,还剩23页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Android4 4 新特性的翻译和笔记新特性的翻译和笔记 朱光升 网名大桥 2013 11 02 2013 11 04 2013 年 11 月 1 日 google 发布了 android4 4 与 android4 1 4 3 不同 更改了新名字叫 KitKat 翻译成奇巧 绿色字体绿色字体为翻译内容 文档右侧文档右侧为笔记批注内容 原文来自原文来自 若转载本文 请保留原作者及翻译者信息 原英文文档版权归 google 原作者所有 AndroidAndroid KitKatKitKat Android Android 新版本奇巧新版本奇巧 KeyKey DeveloperDeveloper FeaturesFeatures 主要特性主要特性 Host Card Emulation 支持安全的 NFC 传输协议HCE Printing framework 打印框架 Storage access framework 存储框架 Low power sensors 低功耗传感器 SMS provider 短信提供者 Full screen Immersive mode 全屏沉浸模式 用于隐藏多余组件 Transitions framework Chromium WebView Screen recording RenderScript NDK Bluetooth HOGP and MAP IR Blasters 翻译成 超级红外 Closed captioning settings RTL features Security enhancements Tools for analyzing memory use Welcome to Android 4 4 KitKat 欢迎来到欢迎来到 Android4 4Android4 4 KitKatKitKat Android KitKat brings all of Android s most innovative most beautiful and most useful features to more devices everywhere KitKatKitKat 带来了所有带来了所有 androidandroid 的最创新 最美丽 最有用的特性 的最创新 最美丽 最有用的特性 This document provides a glimpse of what s new for developers 本文档总体预览一下对开开发者 有哪些新东西 本文档总体预览一下对开开发者 有哪些新东西 Find out more about KitKat for consumers at MakingMaking AndroidAndroid forfor everyoneeveryone让安卓在每一个角落让安卓在每一个角落 Android 4 4 is designed to run fast smooth and responsively on a much broader range of devices than ever before including on millions of entry level devices around the world that have as little as 512MB512MB RAMRAM KitKat streamlines every major component to reduce memory use and introduces new APIs and tools to help you create innovative responsive memory efficient applications OEMs building the next generation of Android devices can take advantage of targetedtargeted recommendationsrecommendations andand optionsoptions to run Android 4 4 efficiently even on low memory devices Dalvik JIT code cache tuning kernel samepage merging KSM swap to zRAM and other optimizations help manage memory NewconfigurationoptionsletOEMstuneout of memorylevelsfor processes set graphics cache sizes control memory reclaim and more OEMOEM 厂商在开发下一代厂商在开发下一代 androidandroid 设备时 可以定制设备时 可以定制 DalvikDalvik JITJIT 代码缓存微调 代码缓存微调 内核同页合并内核同页合并 KSMKSM ZRAMZRAM 交换 以及其它内存优化方法 新的配置选项可以交换 以及其它内存优化方法 新的配置选项可以让让 OEMOEM 厂商细调厂商细调 OOMOOM 级别 设置缓存大小 控制内存回收 级别 设置缓存大小 控制内存回收 In Android itself changes across the system improve memory management and reduce memory footprint Core system processes are trimmed to useuse lessless heapheap and they now more aggressivelyaggressively protectprotect systemsystem memorymemory from apps consuming large amounts of RAM When multiple services start at once such as when network connectivity changes Android now launcheslaunches thethe servicesservices seriallyserially in small groups to avoid peak memory demands AndroidAndroid 自身也改进了内存管理自身也改进了内存管理 核心的系统进程使用更少的堆栈核心的系统进程使用更少的堆栈 更加主动保更加主动保 护系统内存远离大量消耗内存护系统内存远离大量消耗内存 当多个服务一起启动时当多个服务一起启动时 androidandroid 现在顺序来启现在顺序来启 动来些服务 而不是同时 动来些服务 而不是同时 以此避免峰值内存的请求 以此避免峰值内存的请求 For developers Android 4 4 helps you deliver appsapps thatthat areare efficientefficient andand responsiveresponsive on all devices A new API ActivityManager isLowRamDevice lets you tune your app s behavior to match the device s memory configuration You can modify or disable large memory features as needed depending on the use cases you want to support on entry level devices Learn more about optimizing your apps for low memory devices here Android4 4Android4 4 帮 助 你 在 所 有 设 备 上 更 有 效 率 和 更 好 的 响 应 一 个 新帮 助 你 在 所 有 设 备 上 更 有 效 率 和 更 好 的 响 应 一 个 新 的的 API API ActivityManager isLowRamDevice ActivityManager isLowRamDevice 用来判断是否是低内存设备 可以 用来判断是否是低内存设备 可以 让你的程序和设备内存做微调 让你的程序和设备内存做微调 New tools give also give you powerful insight into your app s memory use The procstatsprocstats tooltool details memory use over time with run times and memory footprint for foreground apps and background services An on device view is also available as a new developer option The meminfomeminfo tooltool is enhanced to make it easier to spot memory trends and issues and it reveals additional memory overhead that hasn t previously been visible 2 2个内存观测工具 个内存观测工具 procstatsprocstats 工具 和工具 和 meminfomeminfo 工具 工具 NewNew NFCNFC capabilitiescapabilities throughthrough HostHost CardCard EmulationEmulation 新的新的 NFCNFC 特性 主卡模拟 特性 主卡模拟 HCEHCE Android4 4introducesnewplatformsupportforsecureNFC based transactions through HostHost CardCard EmulationEmulation HCE for payments loyalty programs card access transit passes and other custom services WithWith HCE HCE anyany appapp onon anan AndroidAndroid devicedevice cancan emulateemulate anan NFCNFC smartsmart cardcard letting users tap to initiate transactions with an app of their choice nono provisionedprovisioned securesecure elementelement SE SE inin thethe devicedevice isis neededneeded Apps can also use a new ReaderReader ModeMode to act as readers for HCE cards and other NFC based transactions Android HCE emulates ISO IEC 7816 based smart cards that use the contactless ISO IEC 14443 4 ISO DEP protocol for transmission These cards are used by many systems today including the existing EMVCO NFC payment infrastructure Android uses Application Identifiers AIDs as defined in ISO IEC 7816 4 as the basis for routing transactions to the correct Android applications 使用行业标准使用行业标准 非接卡基于标准非接卡基于标准1444314443 智能卡标准智能卡标准78167816 AndroidAndroid 使用使用7816 47816 4 标准中的标准中的 ApplicationApplication IdentifiersIdentifiers 来作为路由交易的基础 来作为路由交易的基础 Apps declare the AIDs they support in their manifest files along with a category identifier that indicates the type of support available for example payments In cases where multiple apps support the same AID in the same category Android displays a dialog that lets the user choose which app to use 应用应用 AppApp 在它的优化文件中声明在它的优化文件中声明 AIDs AIDs 和类别和类别 IDID 一起 表明了支持的类型 比一起 表明了支持的类型 比 如如 交易交易 当多个 当多个 APPAPP 都支持同一类别和同一都支持同一类别和同一 AIDAID 时 时 androidandroid 显示了一个显示了一个 让用户选择哪个让用户选择哪个 appapp 被执行的对话框 被执行的对话框 When the user taps to pay at a point of sale terminal the system extracts the preferred AID and routes the transaction to the correct application The app reads the transaction data and can use any local or network based services to verify and then complete the transaction 当用户在当用户在 POSPOS 终端拍卡时终端拍卡时 系统取出偏好的系统取出偏好的 AIDAID 并且路由到正确的并且路由到正确的 APPAPP 来交易来交易 AppApp 读出交易数据 可以使用本地服务或网络服务来校验 完成交易 读出交易数据 可以使用本地服务或网络服务来校验 完成交易 Android HCE requires an NFC controller to be present in the device Support for HCE is already widely available on most NFC controllers which offer dynamic support for both HCE and SE transactions Android 4 4 devices that support NFC will include Tap you can use the timestamp information to more accurately synchronize audio with video frames 播放演示时 音频和视频理论上是周步的 但是有时候不同步 这时要靠音频时 间戳来作为与视频帧同步的标记 Wi FiWi Fi CERTIFIEDCERTIFIED MiracastMiracast 经经 WifiWifi 认证的认证的 MiracastMiracast 展示展示 Android 4 4 devices can now be certified to the Wi Fi Alliance Wi Fi Display Specification as Miracast compatible To help with testing a new WirelessDisplaydeveloperoptionexposesadvancedconfiguration controls and settings for Wireless Display certification You can access theoptionatSettingsSettings DeveloperDeveloperoptionsoptions WirelessWirelessdisplaydisplay certificationcertification Nexus 5 is a Miracast certified wireless display device RenderScriptRenderScript ComputeCompute 渲染脚本计算渲染脚本计算 Performance benchmarks for Android 4 4 relative to Android 4 3 run on the same devices Nexus 7 Nexus 10 OngoingOngoing performanceperformance improvementsimprovements When your apps use RenderScript they ll benefit from ongoingongoing performanceperformance tuningtuningintheRenderScriptruntimeitself withouttheneedfor recompilation The chart at right shows performance gains in Android 4 4 on two popular chipsets 如果你使用 RenderScript 将受益于 ongoing performance tuning 不需要重 新编译 便可以加快渲染性能 GPUGPU accelerationacceleration GPUGPU 加速加速 Any app using RenderScript on a supported device benefits from GPU acceleration without code changes or recompiling Since the Nexus 10 first debuted RenderScript GPU acceleration various other hardware partners have added support Now with Android 4 4 GPU acceleration is available on the Nexus 5 as well as the Nexus 4 Nexus 7 2013 and Nexus 10 and we re working with our partners to bring it to more devices as soon as possible RenderScriptRenderScript inin thethe AndroidAndroid NDKNDK 在在 NDKNDK 中的渲染脚本中的渲染脚本 Now you can take advantage of RenderScript directlydirectly fromfrom youryour nativenative codecode A new C API in the Android Native Development Kit NDK lets you access the same RenderScript functionality available through the framework APIs including script intrinsics custom kernels and more If you have large performance intensive tasks to handle in native code you can perform those tasks using RenderScript and integrate them with your native code RenderScript offers great performance across a wide range of devices with automatic support for multi core CPUs GPUs and other processors When you build an app that uses the RenderScript through the NDK you can distribute it to any device running Android 2 2 or or higher just like with the RenderScript support library available for framework APIs GraphicsGraphics 图形处理图形处理 GLES2 0GLES2 0 SurfaceFlingerSurfaceFlinger Android 4 4 upgrades its SurfaceFlinger from OpenGL ES 1 0 to OpenGL ES 2 0 This boosts performance by using multi texturing and it improves color calibration and supports more advanced special effects 从对 OpenGL ES1 0的支持升级到了对 ES2 0的支持 支持更多特效 NewNew HardwareHardware ComposerComposer supportsupport forfor virtualvirtual displaysdisplays 新的硬件合成器 支持虚拟显示器新的硬件合成器 支持虚拟显示器 The latest version of Android Hardware Composer HWComposer 1 3 supports hardware composition of one virtual display in addition to the primary external e g HDMI display and has improved OpenGL ES interoperability 除了支持基本显示器 外部显示器 例如 HDMI 外 还支持虚拟显示器 NewNew TypesTypes ofof ConnectivityConnectivity 新的通信连接类型新的通信连接类型 NewNew BluetoothBluetooth profilesprofiles 新的蓝牙配置新的蓝牙配置 Android 4 4 support for two new Bluetooth profiles to let apps support a broader range of low power and media interactions BluetoothBluetooth HIDHID overover GATTGATT HOGP gives apps a low latency link with low power peripheral devices such as mice joysticks and keyboards BluetoothBluetooth MAPMAP lets your apps exchange messages with a nearby device for example an automotive terminal for handsfree use or another mobile device As an extensionextension toto BluetoothBluetooth AVRCPAVRCP 1 31 3 users can now set absolute volume on the system from their Bluetooth devices 支持了2种新类型的蓝牙配置 HOGP 和 MAP HOGP 用于低时间延迟的鼠标 游戏 杆 键盘等 而 MAP 则允许临近设备通过蓝牙交换信息 Platform support for HOGP MAP and AVRCP is built on the Bluedroid Bluetooth stack introduced by Google and Broadcom in Android 4 2 Support is available right away on Nexus devices and other Android compatible devices that offer compatible Bluetooth capabilities IRIR BlastersBlasters 红外霸红外霸 Android 4 4 introduces platform support for built in IRIR blastersblasters along with a new API and system service that let you create apps to take advantage them 内置红外霸功能 应用可以调用系统的 API 来使用它 Using the new API you can build apps that let users remotely control nearby TVs tuners switches and other electronic devices The API lets your app check whether the phone or tablet has an infrared emitter query it s carrier frequencies and then send infrared signals 新的 API 可以让你控制电视 调谐器以及其它电子设备 API 可以让你的 APP 检 测是否有红外发射器 探测载波 发送红外信号 Because the API is standard across Android devices running Android 4 4 or higher your app can support the broadest possible range of vendors without writing custom integration code Wi FiWi Fi TDLSTDLS supportsupport Android 4 4 introduces a seamless way to stream media and other data faster between devices already on the same Wi Fi network by supporting Wi Fi Tunneled Direct Link Setup TDLS AccessibilityAccessibility System wideSystem wide settingssettings forfor closedclosed captioningcaptioning 标题标题 字幕字幕 风格的系统级设置风格的系统级设置 Android 4 4 now supports a better accessibility experience across apps by adding system wide preferences for Closed Captioning Users can go to SettingsSettings AccessibilityAccessibility CaptionsCaptions to set global captioning preferences such as whether to show captions and what language text size and text style to use Apps that use video can now access the user s captioning settings and adjustadjust presentationpresentation toto meetmeet thethe user suser s preferencespreferences A new captioning manager API lets you check and monitor the user s captioning preferences The captioning manager provides you with the user s preferred captioning state as well as preferred locale scaling factor and text style The text style includes foreground and background colors edge properties and typeface Apps can now refer to the user s system widesystem wide captionscaptions preferencespreferences An example of the expected display style is shown right in the settings In addition apps that use VideoViewVideoView can use a new API to pass a captioning stream along with a video stream for rendering The system automatically handles the display of the captions on video frames according to the user s systemwide settings Currently VideoView supports auto display of captions in WebVTT format only AllAll appsapps thatthat showshow captionscaptions should make sure to check the user s systemwide captioning preferences and render captions as closely as possible to those preferences For more insight into how specific combinations of settings should look you can look at a preview of captions in different languages sizes and styles right in the Settings app EnhancedEnhanced AccessibilityAccessibility APIsAPIs 增强的存取增强的存取 APIAPI Android 4 4 extends the accessibility APIs to support moremore preciseprecise structuralstructural andand semanticsemantic descriptiondescription and observation of onscreen elements With the new APIs developers can improve the quality of accessible feedback by providing accessibility services with more information about on screen elements In accessibility nodes developers can now determine whether a node is a popup get its input type and more You can also use new APIs to work with nodes that contain grid like information such as lists and tables For example you can now specify new supported actions collection information live region modes and more New accessibility events let developers more closely follow the changes that are taking place in window content and they can now listen for changes in the touch exploration mode on the device SupportSupport forfor internationalinternational UsersUsers 对国际化用户的支持对国际化用户的支持 DrawableDrawable mirroringmirroring forfor RTLRTL localeslocales If your app is targeting users who use RTL scripts you can use a new API to declare that a drawabledrawable shouldshould bebe auto mirroredauto mirrored when the user s locale setting includes an RTL language Declaring a drawable as auto mirrored helps you preventprevent duplicationduplication ofof assetsassets in your app and reduces the the size of your APK When you have drawables that are the reusable for both LTR and RTL presentations you can declare the default versions as auto mirrored and then omit those Drawables from your RTL resources Pseudo locales make it easier to test your app s localization You can declare various types of drawables as auto mirrored in your application code such as bitmap nine patch layer state list and other drawables You can also declare a drawable as auto mirrored in your resource files by using a new attribute RTLRTL pseudo localepseudo locale To make it easier to test and debug your layouts Android includes an RTL pseudo locale as a new developer option The RTL pseudo locale switches the device to RTL layout for all locales and displays text in your current language This can help you find layout issues across your app without having to display the app in an RTL language You can access the RTL pseudo localed as in SettingsSettings DeveloperDeveloper optionsoptions ForceForce RTLRTL layoutlayout directiondirection SecuritySecurity enhancementsenhancements 增强的安全性增强的安全性 SELinuxSELinux enforcing enforcing mode mode Android 4 4 updates its SELinux configuration from permissive to enforcing This means potential policy violations within a SELinux domain that has an enforcing policy will be blocked ImprovedImproved cryptographiccryptographic algorithmsalgorithms 改进的图形加密算法改进的图形加密算法 Android has improved its security further by adding support for two more cryptographic algorithms Elliptic Curve Digital Signature Algorithm ECDSA support has been added to the keystore provider improving security of digital signing applicable to scenarios such as signing of an application or a data connection The Scrypt key derivation function is implementedtoprotectthecryptographickeysusedforfull disk encryption OtherOther enhancementsenhancements 其它的增强功能其它的增强功能 On multiuser devices VPNs are now applied per user This can allow a user to route all network traffic through a VPN without affecting other users on the device Also Android now supports FORTIFY SOURCE level 2 and all code is compiled with those protections FORTIFY SOURCE has been enhanced to work with clang 第一 VPN 应用于单独每一个用户 每个用户对全网的路由 并不影响其它用户 第二 现在支持 FORTIFY SOURCE level 2 所有的代码在编译时都经过这些保 护 ToolsTools forfor analyzinganalyzing memorymemory useuse 分析内存的工具分析内存的工具 ProcstatsProcstats A new tool called procstatsprocstats helps you analyze the memory resources your app uses as well as the resources used by other apps and services running on the system Procstats keeps track of howhow appsapps areare runningrunning overover timetime providing data about their execution durations and memory use to help determine how efficiently they are performing This is most important for apps that start services that run in the background since it lets you monitor how long they are running and how much RAM they are using while doing so Procstats will also collect data for foreground applications about memory use over time to determine

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论