วันอังคารที่ 29 พฤษภาคม พ.ศ. 2555

Android 4.0 Platform

-->

Android 4.0 Platform

Welcome to Android 4.0!
Android 4.0 delivers a refined, unified UI for phones and tablets and introduces innovative features for users and developers. This document provides a glimpse of the many new features and technologies that make Android 4.0 simple, beautiful, and beyond smart.
ยินดีต้อนรับสู่ Android 4.0!
Android 4.0 จัดทำ UI ให้สวยขึ้น และทำให้ใช้ได้ทั้งโทรศัพท์และ Tablets ในชุดเดียวกัน และนำเสนอ นวัตกรรมใหม่ๆ สำหรับผู้ใช้และนักพัฒนา ในเอกสารนี้เสนอรายละเอียดคุณสมบัติใหม่ๆ และเทคโนโลยีที่ทำให้ Android 4.0 ง่ายสวยงามและคุณสมบัติที่เหนือกว่า

Developer Features  สิ่งอำนวยความสะดวกสำหรับนักพัฒนา

Unified UI framework for phones, tablets, and more

Android 4.0 brings a unified UI framework that lets developers create elegant, innovative apps for phones, tablets, and more. It includes all of the familiar Android 3.x interface elements and APIs — fragments, content loaders, Action Bar, rich notifications, resizable home screen widgets, and more — as well as new elements and APIs.
For developers, the unified UI framework in Android 4.0 means new UI tools, consistent design practices, simplified code and resources, and streamlined development across the range of Android-powered devices.
UI แบบรวมเป็นหนึ่งเดียวกัน  ทั้งสำหรับโทรศัพท์, แท็บเล็ตและอื่น ๆ
Android 4.0 จะทำรูปแบบ UI ที่ช่วยให้นักพัฒนาสร้างความงดงามผสมความเรียบง่ายในแอปพลิเคชันที่นำสมัย สำหรับโทรศัพท์, แท็บเล็ตและอื่น ๆ ซึ่งจะรวมฟังก์ชัน API และอินเตอร์เฟสที่มีอยู่ใน Android 3.x ด้วย เช่น การแยกส่วนเนื้อหา fragments, content loaders , Action Bar, การแจ้งเตือน notifications  และอื่น ๆ และเพิ่มเติม APIs และ องค์ประกอบใหม่ๆ ขึ้นอีก
สำหรับนักพัฒนา  UI แบบรวมนี้ใน Android 4.0 จะก็หมายถึงเครื่องมือ UI ใหม่ในการออกแบบที่สอดคล้องกัน, เขียนโปรแกรมได้ง่ายและมีทรัพยากรหลากหลาย และพัฒนาได้อย่างคล่องตัวในอุปกรณ์ระบบปฏิบัติการ Android

Communication and sharing การสื่อสารและการแบ่งปัน

Android 4.0 extends social and sharing features to any application on the device. Applications can integrate contacts, profile data, stream items, and calendar events from any of the user’s activities or social networks.

Android 4.0 เพิ่มฟังก์ชันทางเครือข่ายสังคม และ มีการแบ่งบันใช้ข้อมูลร่วมกันกับโปรแกรมอื่น ๆ ในอุปกรณ์  Applications สามารถจะดึงข้อมูลรายละเอียด และข้อมูลปฏิทิน จากกิจกรรมต่างๆของผู้ใช้งาน และผู้ใช้งานเครือข่ายทางสังคมได้ด้วย


Social API   API เครือข่ายสังคม

A shared social provider and API provide a new unified store for contacts, profile data, stream items, and photos. Any app or social network with user permission can contribute raw contacts and make them accessible to other apps and networks. Applications with user permission can also read profile data from the provider and display it in their applications.
The social API lets applications store standard contact data as well as new types of content for any given contact, including large profile photos, stream items, and recent activity feedback. Recent activity feedback is a standard way for applications to “tag” a contact with common activity, such as when the user calls the contact or sends an email or SMS message. The social provider uses the recent activity feedback as a new signal in ranking, such as for name auto-complete, to keep the most relevant contacts ranked closest to the top.
Applications can also let users set up a social connection to a contact from the People app. When the user touches Add Connection in a contact, the app sends a public intent that other apps can handle, displaying any UI needed to create the social connection.
Building on the social API, developers can add powerful new interactions that span multiple social networks and contacts sources.

การจัดการทางเครือข่ายสังคมและ ส่วน API จะทำให้การเก็บข้อมูลแบบร่วมกัน สำหรับติดต่อข้อมูล ให้รายละเอียดรายการ  ข้อมูลแบบสตรีม และภาพถ่าย  ในทุก ๆ App หรือเครือข่ายทางสังคมผู้ใช้มีสิทธิที่จะจัดแบ่งข้อมูล ไปยัง apps อื่น ๆ และเครือข่ายอื่นๆได้  ใน Applications ที่จัดการสิทธิ์ของผู้ใช้นี้ ยังสามารถรับข้อมูลรายละเอียดต่างๆและนำมาใช้ใน Applications ได้ด้วย
Social API ช่วยให้การจัดการข้อมูลให้เป็นแบบมาตรฐานเดียวกันกับ ข้อมูลชนิดใหม่ๆ ตามเนื้อหาสำหรับการติดต่อต่างๆ รวมทั้งรูปถ่ายขนาดใหญ่  ข้อมูลแบบสตรีม และข้อมูลกิจกรรมล่าสุด (Recent activity feedback ) Recent activity feedback เป็นวิธีมาตรฐานสำหรับการใช้ "แท็ก"  tag ที่ติดต่อกับกิจกรรมทั่วไป เช่น เมื่อผู้ใช้ โทรออก หรือส่งอีเมลหรือข้อความ SMS ผู้ให้บริการทางเครือข่ายสังคมที่ใช้ข้อมูลกิจกรรมที่ผ่านมาเป็นเครื่องชี่วัดใหม่ในการจัดอันดับ เช่น การแสดงเรียงรายชื่ออัตโนมัติ เพื่อให้ข้อมูลรายชื่อที่ถูกใช้งานบ่อย ขึ้นอยู่ด้านบน
การใช้งานยังสามารถให้ผู้ใช้ตั้งค่าการเชื่อมต่อทางเครือข่ายสังคมเพื่อติดต่อจาก App ของบุคคล เมื่อผู้ใช้เพิ่มรายชื่อการติดต่อ, App จะส่งการจัดการเชื่อมต่อแบบ public intent ไปยังแอปพลิเคชันอื่น ๆ และการแสดง UI ที่ใช้ในการสร้างการเชื่อมต่อทางสังคม
การสร้าง Social API นักพัฒนาสามารถเพิ่มการโต้ตอบการใช้งานแบบใหม่ๆ ที่มีประสิทธิภาพในข้อมูลรายชื่อการติดต่อ เครือข่ายทางสังคมที่หลากหลายได้

Calendar API  API ปฏิทิน

A shared calendar content provider and framework API make it easier for developers to add calendar services to their apps.
With user permission, any application can add events to the shared database and manage dates, attendees, alerts, and reminders. Applications can also read entries from the database, including events contributed by other applications, and handle the display of event alerts and reminders. Using the calendar provider, applications can take advantage of event data sourced from a variety of apps and protocols, to offer innovative ways of viewing and managing a user’s events. Apps can also use calendar data to improve the relevance of their other content.
For lighter-weight access to calendar services, the Calendar app defines a set of public Intents for creating, viewing, and editing events. Rather than needing to implement a calendar UI and integrate directly with the calendar provider, applications can simply broadcast calendar Intents. When the Calendar app receives the Intents, it launches the appropriate UI and stores any event data entered. Using calendar Intents, for example, apps can let users add events directly from lists, dialogs, or home screen widgets, such as for making restaurant reservations or booking time with friends.

แบ่งบันบริการเนื้อหาข้อมูล ด้านปฏิทินที่ใช้ร่วมกันและ รูปแบบ API ให้ง่ายขึ้นสำหรับนักพัฒนาในการเพิ่มบริการข้อมูลปฏิทินใช้ในแอปพลิเคชันของพวกเขา
ด้วยสิทธิ์ของผู้ใช้แอพลิเคชัน ในทุกๆ การใช้งานสามารถเพิ่มกิจกรรมเพื่อใช้ฐานข้อมูลร่วมกันและจัดการวันที่ได้ การนัดหมายประชุม การปลุกและการแจ้งเตือน การประยุกต์ใช้งานยังสามารถอ่านรายการจากฐานข้อมูลรวมทั้งกิจกรรมต่างๆ ได้โดยโปรแกรมอื่น ๆ และจัดการแสดงแจ้งเตือนเหตุการณ์  การจัดการใช้ปฏิทินสามารถใช้ประโยชน์จากข้อมูลเหตุการณ์ที่มาจากแอปพลิเคชันอื่นๆ เพื่อนำเสนอวิธีการใหม่ๆในการดูและจัดการกิจกรรมของผู้ใช้ได้  Apps ยังสามารถใช้ข้อมูลปฏิทินในการปรับปรุงเนื้อหาอื่น ๆ ที่เกี่ยวข้องได้

Visual voicemail API

A shared Voicemail provider and API allow developers to build applications that contribute to a unified voicemail store. Voicemails are displayed and played in the call log tab of the platform’s Phone app.

การจัดการแบ่งปันข้อมูล Voicemail และ API ให้นักพัฒนาสามารถสร้างโปรแกรมประยุกต์ที่มีการจัดเก็บข้อความเสียงแบบร่วมกันได้ ข้อความเสียงจะถูกแสดงและเล่นในแท็บบันทึกการโทรของ ระบบโทรศัพท์

Android Beam

Android Beam is an NFC-based feature that lets users instantly share information about the apps they are using, just by touching two NFC-enabled phones together. When the devices are in range — within a few centimeters — the system sets up an NFC connection and displays a sharing UI. To share whatever they are viewing with the other device, users just touch the screen.

Android Beam เป็นคุณลักษณะใช้งาน NFC-based ซึ่งช่วยให้แบ่งบันข้อมูลร่วมกันได้ในทันทีการใช้งานเพียงแค่นำโทรศัพท์ มาสัมผัส ใกล้ๆกัน เมื่ออุปกรณ์อยู่ในระยะที่ทำงานถึง – ภายในไม่เกิน  4 เซนติเมตร - ระบบตั้งค่าการเชื่อมต่อและแสดง UI ร่วมกัน เพื่อแบ่งปันข้อมูลหรือ App ที่กำลังทำงานอยู่ กับอุปกรณ์อื่น ๆ ที่ผู้ใช้เพียงแตะที่หน้าจอ

Modular sharing widget

The UI framework includes a new widget, ShareActionProvider, that lets developers quickly embed standard share functionality and UI in the Action Bar of their applications. Developers simply add ShareActionProvider to the menu and set an intent that describes the desired sharing action. The system handles the rest, building up the list of applications that can handle the share intent and dispatching the intent when the user chooses from the menu.

รูปแบบ UI รวมถึงเครื่องมือใหม่ๆ, ShareActionProvider ที่ให้นักพัฒนาทำงานได้อย่างรวดเร็วเป็นฟังก์ชันการทำงานที่มาตรฐานและ UI ใน Action Bar ในการทำงาน นักพัฒนาเพียงแค่เพิ่ม ShareActionProvider ที่เมนูและตั้งค่าเชื่อมต่อ ที่จะแบ่งบันการทำงาน  แล้วระบบจัดการสร้างขึ้นส่วนที่เหลือของรายการของโปรแกรมที่สามารถจัดการแบ่งบันข้อมูลและส่งข้อมูลเมื่อเลือกใช้จากเมนู

--> New media capabilities

Low-level streaming multimedia

Android 4.0 provides a direct, efficient path for low-level streaming multimedia. The new path is ideal for applications that need to maintain complete control over media data before passing it to the platform for presentation. For example, media applications can now retrieve data from any source, apply proprietary encryption/decryption, and then send the data to the platform for display.
Applications can now send processed data to the platform as a multiplexed stream of audio/video content in MPEG-2 transport stream format. The platform de-muxes, decodes, and renders the content. The audio track is rendered to the active audio device, while the video track is rendered to either a Surface or a SurfaceTexture. When rendering to a SurfaceTexture, the application can apply subsequent graphics effects to each frame using OpenGL.

To support this low-level streaming, the platform introduces a new native API based on Khronos OpenMAX AL 1.0.1. The API is implemented on the same underlying services as the platform’s existing OpenSL ES API, so developers can make use of both APIs together if needed. Tools support for low-level streaming multimedia will be available in an upcoming release of the Android NDK.


Android 4.0 ทำงานในระบบมัลติมีเดียสตรีมมิ่งอย่างมีประสิทธิภาพเหมาะสมกับการใช้งานที่ไม่ต้องปรับแต่ง และควบคุมการทำงานอย่างสมบูรณ์ของสื่อข้อมูล และส่งผ่านไปยังการใช้งานด้านอื่นๆ ตัวอย่างเช่น โปรแกรมสื่อข้อมูลสามารถไปดึงข้อมูลจากแหล่ง โดยใช้การเข้ารหัส / ถอดรหัสเฉพาะ แล้วส่งข้อมูลไปแสดงผล
การประยุกต์ใช้งานนี้สามารถส่งข้อมูลในรูปแบบของ MPEG-2 ทั้งภาพและเสียง ระบบจะจัดการข้อมูล ทำการเข้ารหัสและถอดรหัสแล้วส่งข้อมูลไป เมื่อภาพ และเสียงได้ถูกจัดการเรียบร้อยแล้ว เสียงก็ส่งไปยังอุปกรณ์เล่นเสียง ภาพก็จะส่งไปยัง Surface หรือ SurfaceTexture การใช้งานแอพลิเคชันสามารถแสดงผลกราฟิกแบบ OpenGL ได้
เพื่อสนับสนุนการส่งข้อมูลแบบสตรีมมิ่งนี้ซึ่งเป็นแพลตฟอร์มใหม่ แบบ Native API บนKhronos OpenMAX AL 1.0.1 ส่วน API จะใช้งานเช่นเดียวกับแพลตฟอร์มเดิมที่มีอยู่ของ OpenSL ES API  ดังนั้นนักพัฒนาสามารถใช้ประโยชน์ของ API ทั้งสองร่วมกันได้ถ้าจำเป็น  ส่วนเครื่องมือที่สนับสนุนสำหรับมัลติมีเดียสตรีมมิ่ง จะสามารถใช้ได้ในแบบของ Android NDK


New camera capabilities

Developers can take advantage of a variety of new camera features in Android 4.0. ZSL exposure, continuous focus, and image zoom let apps capture better still and video images, including during video capture. Apps can even capture full-resolution snapshots while shooting video. Apps can now set custom metering regions in a camera preview, then manage white balance and exposure dynamically for those regions. For easier focusing and image processing, a face-detection service identifies and tracks faces in a preview and returns their screen coordinates.

นักพัฒนาสามารถใช้ประโยชน์คุณสมบัติใหม่ของกล้องได้อย่างหลากหลายใน Android 4.0 เช่น ZSL exposure, โฟกัสอย่างต่อเนื่อง continuous focus และซูมภาพ สามารถทำให้ Appsจับภาพได้ดีขึ้น ทั้งภาพนิ่งและวิดีโอ  Apps ยังสามารถจับภาพแบบและความละเอียดสูงในขณะที่ถ่ายวิดีโออยู่  Apps ขณะนี้สามารถตั้งค่าการวัดแสงตามสถานที่ ที่กำหนดเองในการ พรีวิว ภาพแล้วจัดการสมดุลสีขาว while Balance การใช้ง่ายขึ้น ด้วยการโฟกัสและการประมวลผลภาพ ระบบตรวจสอบใบหน้า face-detection service และติดตามใบหน้า


Media effects for transforming images and video

A set of high-performance transformation filters let developers apply rich effects to any image passed as an OpenGL ES 2.0 texture. Developers can adjust color levels and brightness, change backgrounds, sharpen, crop, rotate, add lens distortion, and apply other effects. The transformations are processed by the GPU, so they are fast enough for processing image frames loaded from disk, camera, or video stream.

การจัดการ แอฟเฟคภาพที่มีประสิทธิภาพสูง ให้นักพัฒนานำจัดการภาพแบบ OpenGL ES 2.0   นักพัฒนาสามารถปรับระดับความสว่างของสีและ เปลื่ยนพื้นหลัง หมุนภาพ การใช้ดิสเทอชั่นและแอฟเฟคอื่น ๆ โดยใช้ GPU เป็นตัวประมวลผล ดังนั้นความเร็วในการทำงานเพียงพอสำหรับการประมวลผลภาพที่โหลดจากเมโมรี่ หรือ ภาพเคลื่อนไหวกล้องหรือวิดีโอ


Audio remote controls

Android 4.0 adds a new audio remote control API that lets media applications integrate with playback controls that are displayed in a remote view. Media applications can integrate with a remote music playback control that’s built into in the platform’s lock screen, allowing users to control song selection and playback without having to unlock and navigate to the music app.
Using the audio remote control API, any music or media app can register to receive media button events from the remote control and then manage play state accordingly. The application can also supply metadata to the remote control, such as album art or image, play state, track number and description, duration, genre, and more.


Android 4.0 เพิ่ม API ใหม่ในการควบคุมเสียงที่ช่วยให้การใช้งานและควบคุมการเล่นเสียง การประยุกต์ใช้งาน การเล่นเสียงสามารถทำงานได้ แม้กระทั่งมีการล็อกหน้าจอ ช่วยให้ผู้ใช้งานสามารถควบคุมการเลือกและเล่นเพลง ได้โดยไม่ต้องปลดล็อคหน้าจอแล้วไปเปิด App
ในการควบคุม API  App การเล่นเพลงหรือภาพวิดีโอ สามารถรับรู้การกดปุ่มต่างๆ เพื่อควบคุมการใช้งาน โปรแกรมยังสามารถจัดหาข้อมูลเพิ่มเติม เช่น หน้าปกอัลบั้ม หรือภาพ จำนวนแทร็คและรายละเอียดระยะเวลา, ประเภท, และอื่น ๆ


New media codecs and containers

Android 4.0 adds support for additional media types and containers to give developers access to the formats they need. For high-quality compressed images, the media framework adds support for WebP content. For video, the framework now supports streaming VP8 content. For streaming multimedia, the framework supports HTTP Live streaming protocol version 3 and encoding of ADTS-contained AAC content. Additionally, developers can now use Matroska containers for Vorbis and VP8 content.

Android 4.0 เพิ่มการสนับสนุนสำหรับชนิดของไฟล์มีเดีย และที่เก็บไฟล์เพิ่มขึ้น นักพัฒนาสามารถเข้าถึงรูปแบบที่พวกเขาต้องการ สำหรับภาพที่มีคุณภาพสูงที่บีบเพิ่มการสนับสนุนสำหรับเนื้อหา WebP สำหรับวิดีโอในขณะนี้สนับสนุนสตรีมมิ่ง VP8  สำหรับมัลติมีเดียสตรีมมิ่งกรอบรองรับโปรโตคอลที่ เวอร์ชั่น 3 และรองรับการเข้ารหัสของ ADTS-AAC นอกจากนี้นักพัฒนาสามารถใช้ Matroska  สำหรับ Vorbis และ VP8 ได้

--> New types of connectivity

Wi-Fi Direct

Developers can use a framework API to discover and connect directly to nearby devices over a high-performance, secure Wi-Fi Direct connection. No internet connection or hotspot is needed.
Wi-Fi Direct opens new opportunities for developers to add innovative features to their applications. Applications can use Wi-Fi Direct to share files, photos, or other media between devices or between a desktop computer and an Android-powered device. Applications could also use Wi-Fi Direct to stream media content from a peer device such as a digital television or audio player, connect a group of users for gaming, print files, and more.


นักพัฒนาสามารถใช้ API นี้เพื่อค้นหาและเชื่อมต่อโดยตรงกับอุปกรณ์ที่ใกล้เคียง, เป็นระบบการเชื่อมต่อ Wi-Fi แบบปลอดภัยแบบโดยตรง ไม่จำเป็นต้องเชื่อมต่ออินเทอร์เน็ตหรือฮอตสปอต Wi-Fi Direct เปิดโอกาสใหม่ให้สำหรับนักพัฒนาเพื่อเพิ่มคุณสมบัติใหม่เพื่อการใช้งานของพวกเขา การประยุกต์ใช้งานสามารถใช้บริการ Wi-Fi Direct ที่จะแบ่งปันไฟล์ภาพถ่ายหรือสื่ออื่น ๆ ระหว่างอุปกรณ์หรือระหว่างเครื่องคอมพิวเตอร์ตั้งโต๊ะและอุปกรณ์ระบบปฏิบัติการ Android การประยุกต์ใช้งานยังสามารถใช้บริการ Wi-Fi Directไปยังข้อมูลแบบสตรีมจากอุปกรณ์อื่นๆ เช่นโทรทัศน์หรือเครื่องเล่นเสียงดิจิตอล เชื่อมต่อกลุ่มของผู้เล่นเกม พิมพ์ไฟล์ และอื่น ๆ

Bluetooth Health Device Profile (HDP)

Developers can now build powerful medical applications that use Bluetooth to communicate with wireless devices and sensors in hospitals, fitness centers, homes, and elsewhere. Applications can collect and manage data from HDP source devices and transmit it to backend medical applications such as records systems, data analysis services, and others.
Using a framework API, applications can use Bluetooth to discover nearby devices, establish reliable or streaming data channels, and manage data transmission. Applications can supply any IEEE 11073 Manager to retrieve and interpret health data from Continua-certified devices such as heart-rate monitors, blood meters, thermometers, and scales. 


บลูทูธ สำหรับอุปกรณ์สุขภาพ (HDP)
นักพัฒนาสามารถสร้างโปรแกรมประยุกต์ที่ใช้ในทางการแพทย์ที่มีประสิทธิภาพที่ใช้บลูทูธ ในการสื่อสารกับอุปกรณ์ไร้สายและเซ็นเซอร์ในโรงพยาบาล, ศูนย์ออกกำลังกาย, ที่อยู่อาศัยและที่อื่น ๆ การประยุกต์ใช้งานสามารถรวบรวมและจัดการข้อมูลจากอุปกรณ์ต้นทาง HDP และส่งมันไปใช้งานทางระบบการแพทย์แบ็กเอนด์ เช่น ระบบบันทึกข้อมูลการให้บริการวิเคราะห์และอื่น ๆ
การใช้งาน API นี้, สามารถใช้บลูทูธ ที่จะค้นหาอุปกรณ์ในบริเวณใกล้เคียง สร้างช่องทางข้อมูลหรือข้อมูลสตรีมมิ่งและจัดการการส่งข้อมูล การประยุกต์ใช้ใด ๆ สามารถจัดการด้วยมาตรฐาน IEEE 11073 เพื่อรับส่งข้อมูลด้านสุขภาพจากอุปกรณ์มาตรฐาน Continua-certified เช่น จอภาพอัตราการเต้นหัวใจ, เครื่องตรวจเลือด เครื่องวัดอุณหภูมิและเครื่องชั่งน้ำหนัก


New UI components and capabilities

Layout enhancements

A new layout, GridLayout, improves the performance of Android applications by supporting flatter view hierarchies that are faster to layout and render. Because hierarchies are flatter, developers can also manage alignments between components that are visually related to each other even when they are not logically related, for precise control over application UI. GridLayout is also specifically designed to be configured by drag-and-drop design tools such as the ADT Plug-in for Eclipse.

Layout ปรับรูปแบบใหม่
รูปแบบใหม่ ใน GridLayout, ช่วยเพิ่มประสิทธิภาพของโปรแกรม Android โดยการสนับสนุนลำดับชั้นมุมมองที่ดูเหมือนจริง และแสดงผลที่เร็วขึ้น นักพัฒนายังสามารถจัดการ การจัดแนวระหว่างส่วนประกอบให้สัมพันธ์กัน สำหรับการควบคุมที่เที่ยงตรงแม่นยำขึ้นในการใช้ UI. GridLayout ยังออกแบบมาเฉพาะเพื่อกำหนดค่าโดยการลากและวางในเครื่องมือการออกแบบเช่น ADT Plug-in สำหรับ Eclipse

OpenGL ES texture views

A new TextureView object lets developers directly integrate OpenGL ES textures as rendering targets in a UI hierarchy. The object lets developers display and manipulate OpenGL ES rendering just as they would a normal view object in the hierarchy, including moving, transforming, and animating the view as needed. The TextureView object makes it easy for developers to embed camera preview, decoded video, OpenGL game scenes, and more. TextureView can be viewed as a more powerful version of the existing SurfaceView object, since it offers the same benefits of access to a GL rendering surface, with the added advantage of having that surface participate fully in the normal view hierarchy.

TextureView อันใหม่ช่วยให้นักพัฒนาตรงกับ OpenGL ES เพื่อการแสดงผลในลำดับชั้นของ UI  TextureView นี้จะช่วยให้นักพัฒนาใช้งาน OpenGL ES แสดงและควบคุมการแสดงผลได้เช่นเดียวกับ View แบบเดิมได้ เช่น การย้าย, การเปลี่ยนภาพ, และภาพเคลื่อนไหวได้ตามต้องการ  TextureView ใช้งานง่ายสำหรับนักพัฒนาที่จะใช้การแสดงภาพจากกล้องวิดีโอ, ฉากเกม แบบ OpenGL และอื่น ๆ TextureView เป็น View ที่มีประสิทธิภาพมากขึ้น แบบ SurfaceView เนื่องจากจะมีประโยชน์เหมือนกันในการแสดงผลแบบ GL และเพิ่มข้อดีในการใช้งานเหมือน View ทั่วไปในการแสดงผล

Hardware-accelerated 2D drawing

All Android-powered devices running Android 4.0 are required to support hardware-accelerated 2D drawing. Developers can take advantage of this to add great UI effects while maintaining optimal performance on high-resolution screens, even on phones. For example, developers can rely on accelerated scaling, rotation, and other 2D operations, as well as accelerated UI components such as TextureView and compositing modes such as filtering, blending, and opacity.

อุปกรณ์ Android ที่ใช้ Android 4.0 จะต้องสนับสนุนฮาร์ดแวร์เร่งการวาดภาพ 2D ( Hardware-accelerated 2D drawing ) นักพัฒนาสามารถใช้ประโยชน์ในเพิ่มลูกเล่นการแสดง UI ได้ดี ในขณะที่ยังคงรักษาประสิทธิภาพในบนการทำงานหน้าจอความละเอียดสูง และหน้าจอโทรศัพท์ทั่วไป ตัวอย่างเช่นนักพัฒนาสามารถใช้เร่งความเร็วในการปรับขนาดภาพ การหมุนภาพและการลูกเล่นแบบ 2 มิติอื่น ๆ และก็มีผลให้เพิ่มความเร็วของ UI เช่น TextureView และ Compositing Modes เช่น การกรองภาพ การผสมภาพ และความทึบหรือโปร่งแสงของภาพ

New input types and text services

Stylus input, button support, hover events

Android 4.0 includes full support for stylus input events, including tilt and distance axes, pressure, and related motion event properties. To help applications distinguish motion events from different sources, the platform adds distinct tool types for stylus, finger, mouse, and eraser. For improved input from multi-button pointing devices, the platform now provides distinct primary, secondary, and tertiary buttons, as well as back and forward buttons. Hover-enter and hover-exit events are also added, for improved navigation and accessibility. Developers can build on these new input features to add powerful interactions to their apps, such as precise drawing and gesturing, handwriting and shape recognition, improved mouse input, and others.

Android 4.0 สนับสนุนอย่างเต็มที่ในการทำงาน แบบปากกาสไตลัส  รวมทั้งการเอียงเครื่อง มุมใช้งาน และความกดอากาศที่มีผล และคุณสมบัติการเคลื่อนไหว เพื่อช่วยให้การใช้งานในกิจกรรมต่างๆได้ดี  และเพิ่มประเภทเครื่องมืออื่นๆอีก สำหรับสไตลัส, การใช้มือนิ้ว, การใช้เมาส์และการลบ ปรับปรุงการรับข้อมูลจากอุปกรณ์แบบหลายปุ่ม ซึ่งจัดระดับความสำคัญเป็น primary, secondary และระดับอื่นๆ ที่แตกต่างกันเช่นเดียวกับปุ่มย้อนกลับและปุ่มไปข้างหน้า ส่วนการใช้งานที่แทรกเข้ามาและเหตุการณ์ที่ยกเลิกออกไป ได้เพิ่มเข้ามาด้วยเพื่อใช้งานได้ดียิ่งขึ้น นักพัฒนาสามารถสร้างคุณสมบัติใหม่เหล่านี้เพื่อเพิ่มประสิทธิภาพการใช้งานของ แอปพลิเคชัน เช่น การวาดภาพที่แม่นยำและกำหนดจุด หรือกดปุ่ม, การเขียนด้วยลายมือและการรับสร้างรูปร่าง การเพิ่มการใช้งานเมาส์ที่ดีขึ้นและอื่น ๆ อีก

Text services API for integrating spelling checkers

Android 4.0 lets applications query available text services such as dictionaries and spell checkers for word suggestions, corrections, and similar data. The text services are external to the active IME, so developers can create and distribute dictionaries and suggestion engines that plug into the platform. When an application receives results from a text service — for example, word suggestions — it can display them in a dedicated suggestion popup window directly inside the text view, rather than relying on the IME to display them. 

API บริการข้อความ สำหรับการตรวจสอบการสะกดคำ
Android 4.0 ช่วยให้การใช้งานแสดงข้อความ เช่น พจนานุกรม และการสะกดคำสำหรับคำที่แนะนำ คำที่ควรแก้ไข และข้อมูลที่คล้ายกัน API บริการข้อความจะแสดงผลใน IME ที่ใช้งานเพื่อให้นักพัฒนาสามารถสร้างและแจกจ่ายพจนานุกรมและเครื่องมือข้อเสนอแนะเข้ากับระบบ เมื่อโปรแกรมได้รับผลข้อมูลตอบกลับจากการให้บริการข้อความ – ตัวอย่างคำ ,ข้อเสนอแนะคำ – มันสามารถแสดงไว้ที่หน้าจอ TextView ป๊อปอัพเฉพาะข้อเสนอแนะขึ้นมาโดยตรง ใน IME ที่แสดงมันขึ้นมา


Enhanced accessibility APIs

Android 4.0 adds new accessibility features and an enhanced API to let developers improve the user experience in their apps, especially on devices that don’t have hardware buttons. For accessibility services such as screen readers in particular, the platform offers new APIs to query window content, for easier navigation, better feedback, and richer user interfaces.

Android 4.0 เพิ่มคุณสมบัติใหม่และการเข้าถึงการใช้งาน ด้วยปรับปรุง API เพื่อให้นักพัฒนาเพิ่มลูกเล่นใหม่ๆ มาใช้ในแอพพลิเคชั่นของพวกเขาโดยเฉพาะอย่างยิ่งในอุปกรณ์ที่ไม่ได้มีปุ่มกดแบบฮาร์ดแวร์  สำหรับการเข้าถึงโปรแกรม เช่น โปรแกรมอ่านหน้าจอโดยเฉพาะ ระบบจะใช้ APIs ใหม่นี้ในการแสดงข้อมูลหน้าจอ ใช้งานง่าย,  การตอบสนองที่รวดเร็ว และ มีส่วนติดต่อผู้ใช้ UI ได้ดียิ่งขึ้น


Accessibility API

To let applications manage interactions more effectively when accessibility features are enabled, the platform adds accessibility events for explore-by-touch mode, scrolling, and text selection. For these and other events, the platform can attach a new object called an accessibility record that provides extra information about the event context.
Using the accessibility record and related APIs, applications can now access the view hierarchy associated with an event. Applications can query for key properties such as parent and child nodes, available states, supported actions, screen position, and more. Applications can also request changes to certain properties to help manage focus and selected state. For example, an accessibility service could use these new capabilities to add convenient features such as screen-search by text.


เพื่อให้การจัดการ การเข้าใช้งานได้อย่างมีประสิทธิภาพเมื่อ เมื่อคุณสมบัติการใช้งานทำงานระบบจะเพิ่ม การทำงานส่วนการเข้าใช้งานโดยโหมดในการสัมผัสการเลื่อนขึ้นหรือลง และระบบการเลือกข้อความ สำหรับส่วนการทำงานเหล่านี้และแบบอื่น ๆ ระบบจะมีการบันทึกการใช้สร้างเป็นส่วนใหม่ new object ที่เรียกว่าการบันทึกเข้าใช้งาน accessibility record ซึ่งจะให้ข้อมูลเสริมเกี่ยวกับเหตุการณ์ส่วนต่างๆ

Security for apps and content

Secure management of credentials
Android 4.0 makes it easier for applications to manage authentication and secure sessions. A new keychain API and underlying encrypted storage let applications store and retrieve private keys and their corresponding certificate chains. Any application can use the keychain API to install and store user certificates and CAs securely.



Address Space Layout Randomization

Android 4.0 now provides address space layout randomization (ASLR) to help protect system and third party applications from exploitation due to memory-management issues.

Enhancements for Enterprise

VPN client API

Developers can now build or extend their own VPN solutions on the platform using a new VPN API and underlying secure credential storage. With user permission, applications can configure addresses and routing rules, process outgoing and incoming packets, and establish secure tunnels to a remote server. Enterprises can also take advantage of a standard VPN client built into the platform that provides access to L2TP and IPSec protocols.

Device policy management for camera

The platform adds a new policy control for administrators who manage devices using an installed Device Policy Manager. Administrators can now remotely disable the camera on a managed device for users working in sensitive environments.

Android example code 
http://androidcodeexample.blogspot.com/


Android Control ควบคุมอุปกรณ์ต่างๆ ด้วย Android

สอนเขียน Android  สอนเขียนโปรแกรม Android




ไม่มีความคิดเห็น:

แสดงความคิดเห็น