Android 4.1 for developers

Source: Internet
Author: User
Tags home screen

 

Welcome to the world of android4.1 and Jelly Bean!

Android4.1 is the fastest and smoothest version. We have made many improvements and added many great new features and features. In this document, let's take a quick look. The android 4.1 APIs document contains details about the new development interface. Www.android.com find more jelly
New User features of bean.

Faster, smoother, and lower response latency

Android4.1 has been optimized to make the UI more concise and intuitive, while also bringing the best performance and the lowest touch latency.

To ensure consistent frame speed, all the drawings and animations of the android 4.1 Framework will be synchronized with vsync timing, application rendering, touch events, image charts, display refresh, and other operations will all be locked in response within 16 milliseconds, and all frames are not in advance or backward.

Android4.1 adds the triple image buffering technology to make rendering feel smoother. The Touch latency not only follows the vsync timing, but also pre-judges the touch operation for advance rendering. In addition, more processing capabilities are allocated when the CPU is idle to deal with touch events, make sure the touch has no latency.

The SDK development tool will also provide a new tool, systrace, which allows developers to directly use mobile phone data in the Linux kernel to determine the cause of rendering interruption. Now you can find it in the android SDK (tools R20 or higher.

 

Enhanced auxiliary functions

In terms of accessibility, the jelly bean API will be more complete, so that users with poor eyesight can better operate their mobile phones; developers can also implement more comprehensive auxiliary functions based on new APIs and extend Android functions.

Android4.1 also incorporates the powerful gesture mode function (gesture mode), which allows users to navigate the system, operate with touch, slide, and other gestures, and supports voice output. Android 4.1 has also designed a plug-in for the disabled. With this plug-in, consumers can use USB or Bluetooth to connect blind input and output devices, making the operation easier.

Better international support

 

Bidirectional text and multi-language support

Android4.1 will better support two-way text display, so that users can use the language displayed from right to left. It will support multiple languages, the application will also be able to use the new Arabic, Hebrew, and Other Language Environments and related fonts, and will also support Unicode 6.0 characters.

Enhanced Input Method

In the new system, the input on the virtual keyboard is more intelligent, and its built-in dictionary is more accurate and more relevant to the input. For example, the language module with built-in dictionaries in Android 4.1 is like a chameleon. As user input changes, it intelligently changes. At the same time, it can easily predict the words to be played by users, it also supports voice input.

The new voice input function supports offline mode. After downloading the offline package of the corresponding language, you can complete voice analysis without having to connect to the Internet.

New methods to build a more beautiful UI

 

The developer can customize the style of the notification bar to display their content and interactive responses.

Enhanced notification bar

The new notification system changes the UI first. After the expanded status bar is pulled down, it will overwrite the original status bar display. The time and date display of the time expanded status bar is more reasonable and beautiful, the clear button in the notification bar on the right becomes more holo-flavored. The bottom side of the page also changes, and the pull process turns blue, and the background turns gray-white.

In addition, developers can use three different notification styles in the new version of the system, which can reach up to DP to display more information. In addition, the new notifications are based on the original information prompts and quick access, allows more interactive operations. In this way, you can directly view images, information, emails, reminders, and other content, and perform one-click callback, one-click Sharing, one-click reply, and other operations without entering the program.

When the new notification is displayed, the old notification will be automatically removed as a concise style. You can expand and withdraw the corresponding notification bar expansion area through the dual-finger gesture to view more information directly.

In addition, the "show notification" switch of the application is added to jelly bean to disable unwanted application notifications and push messages.

 

Widget size adaptive

This improvement introduced by android4.1 enables the app widget to automatically change the size. Based on the user's drag position on the home screen and the remaining space, the widget will try to expand itself to display more content. The new widget APIs allows you to better design widgets of different sizes to present the best content.

The new built-in launcher desktop plug-in will automatically adjust the size according to the user's drag direction and location to adapt to the screen layout. If there is not enough desktop space, the program icon will automatically pop up and leave a blank space. If there is not enough space, the plug-in space will be automatically reduced to facilitate placement. When you Drag widgets to a new home screen, widgets is automatically adjusted to the maximum size.

Easier customization of app startup animations

You can use a new help class activityoptions to create and control the animation display when an application is started. With this help class, you can use special animation resources to develop the animation effect, or use a new zoom animation to include a bitmap, rectangular enlargement.

Light off mode and full screen mode

The new system uiview tag makes your application UI more concise. In "light-off mode (the status bar and navigation bar are both obscure)" and "Full Screen mode (the status bar and navigation bar are hidden )".

New remoteable
View type

Developers can use and view the plug-in and notification bar on the main interface. Gridlayout allows you to directly manage subviews and delete drawing content at the shortest UI level as needed. Viewstub is an invisible view with a size of 0. It can be used to leisurely fill layout resources during runtime.

Live wallpaper Preview

Android4.1 allows users to conveniently find installed Live wallpapers. If your app contains a dynamic wallpaper, you can use action_change_live_wallpaper to start an activity to preview the wallpaper effect. In the preview, you can choose to directly use the wallpaper.

Support for high resolution of contact photos

In Android 4.1, you can use images with higher resolution as contact photos.

New input device

External Device plugging discovered

In Android 4.1, when a new input device is connected via Bluetooth, USB, or any other connection type, the system will send a notification asking the user to choose whether to switch. For example, you have connected a game controller. The new system also allows applications and games to query the Device Manager and select which device to use for input, and provide a touch of vibration when these devices work.

Animation and graphics

Application vsync

The improved Android framework through the vsync mechanism can bring a unified, smooth, and stable UI interface. Therefore, the application also benefited from this. android4.1 enhanced the vsync timer to collaborate with all the drawing and animation operations. In this way, the UI thread and logic code are synchronized Based on the timer.

In specific circumstances, the application can access the vsync timer through the interface provided by the system. Re-draw the next vsync frame at any time-a good way to orchestrate an animation, if not using the built-in frame animation. More advanced applications, such as the next vsunc frame, can also provide a callback function.

New animation responses and types

The new animation framework now allows you to define the start and end response. When you run the viewpropertyanimator animation, It is synchronized with other operations of the application. You can also use a specific layer to construct a viewpropertyanimator animation. Previously, it was best to listen to the animation and then remove the layer from the onanimationend () event but at the end of the animation. Now, the withlayer () function can be implemented in a simple sentence.

Layouttransition adds a new animation type, which enables the viewgroup to automatically respond to any layout changes.

New Connection Type

Beam is a feature based on NFC Technology in Android 4.0. It allows two NFC-supported mobile phones to be quickly touched and shared. In Android 4.1, android beam allows you to share images, videos, and other files more easily. After you start a transmission operation, your mobile phone will be transmitted through Bluetooth.

Android4.1 also introduces the DNS-based network service discovery function, which allows you to search for services including mobile devices, printers, cameras, and players through the Wi-Fi network, developers can use this new feature to implement cross-platform multiplayer online games, or connect their mobile phones to cameras, printers, or other mobile devices.

Peer-to-peer connection is also the direct service discovery function of wifi (P2P). You can enable your mobile phone to enable your wireless network card. You can directly find other mobile WiFi devices without the need for a mobile network or Wi-Fi network, data transmission and resource sharing are enabled. You can use wifi to directly discover shared files and online games.

The new version also adds the network bandwidth management function to better cope with traffic statistics and save your own traffic.

New media features

In jelly beans, the system provides more convenient hardware and software decoder access, supports USB audio output, audio recording triggering, multi-channel audio/video output (HDMI port), AAC 5.1 audio codec support, audio preprocessing provides higher sound quality, and the Media Manager allows users to select the method used for media output.

Graphic rendering computing Enhancement

Android4.1 enhances renderscript computing and brings more flexibility. Now, you can try textures in the renderscript code. New programs can be used to define the scripts required for floating point precision. This allows you to enable the neon command, just like the speed vector operation on the CPU path. Others cannot be in the IEEE 754-2008 standard.

Now, you can compile your renderscript computing script on x86 devices or hardware. You can also define a multi-root kernel in a renderscript source file.

Enhance browsers and web pages

In android4.1, the browser and webpage display are enhanced as follows:

L better HTML5 video screen experience, including touch play/pause and smooth full screen animation.

L less memory usage brings a better scrolling and scaling experience.

L improve HTML5, css3, and canvas animations.

L enhance text input.

L update JavaScript Engine (V8) to provide better JavaScript performance.

New Google interfaces and services

Google provides a new free cloud message service, and the googleplay store will also provide encryption measures to bind apps to devices to prevent cracking and piracy.

You do not need to download the complete installation package for smart application updates. You only need to download the modified package, which can save traffic, endurance, and time.

In 4.1, a widget named sound search is added. You only need to sing to your mobile phone or play the music you hear. It will tell you what the song is, if you are in the United States, you can purchase the music directly in Google Play Mall. In addition, there will be the upcoming Google games service.

Googleplay adds the content purchase and subscription function. Users can now purchase movies, TV programs, and magazines through Google Play. Google announced its partnership with Disney, ABC, NBC, universal, Sony Pictures (sonypictures), paramount, and magazine publishers condenast and Hearst at the conference.

Google Maps (supports offline), Google Street, Google Chrome, Google +, and Google currents (magazine applications) are also released with jelly bean.

Download the original Word document.Clickme!

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.