This means that the platform will scale depending on screen size and resolution, and that it will also scale apps to fit them. Basically, developers need to do very little to have their apps fully compatible with the new device.
Devs can ensure that their hdpi assets can be easily scaled for tvdpi through taking care of the 9-patch images. They need to be created correctly so that they could be scaled down effectively, Nick Butcher notes. For developers, restricted profiles offer a new way to deliver more value and control to your users. You can implement app restrictions — content or capabilities controls that are supported by your app — and advertise them to tablet owners in the profile configuration settings.
You can add app restrictions directly to the profile configuration settings using predefined boolean, select, and multi-select types.
If you want more flexibility, you can even launch your own UI from profile configuration settings to offer any type of restriction you want. When your app runs in a profile, it can check for any restrictions configured by the owner and enforce them appropriately. For example, a media app might offer a restriction to let the owner set a maturity level for the profile.
At run time, the app could check for the maturity setting and then manage content according to the preferred maturity level. If your app is not designed for use in restricted profiles, you can opt out altogether, so that your app can't be enabled in any restricted profile. Google Play services offers advanced location APIs that you can use in your apps. Hardware geofencing optimizes for power efficiency by performing location computation in the device hardware, rather than in software.
On devices that support hardware geofencing, Google Play services geofence APIs will be able to take advantage of this optimization to save battery while the device is moving. Wi-Fi scan-only mode is a new platform optimization that lets users keep Wi-Fi scan on without connecting to a Wi-Fi network, to improve location accuracy while conserving battery. Apps that depend on Wi-Fi for location services can now ask users to enable scan-only mode from Wi-Fi advanced settings.
Wi-Fi scan-only mode is not dependent on device hardware and is available as part of the Android 4. New sensor types allow apps to better manage sensor readings. Uncalibrated gyroscope and uncalibrated magnetometer sensors report raw measurements as well as estimated biases to apps.
The new hardware capabilities are already available on Nexus 7 and Nexus 4 devices, and any device manufacturer or chipset vendor can build them into their devices. To meet the needs of the next generation of media services, Android 4.
Through a combination of new APIs and enhancements to existing APIs, the media DRM framework provides an integrated set of services for managing licensing and provisioning, accessing low-level codecs, and decoding encrypted media data. Apps using the media DRM framework manage the network communication with a license server and handle the streaming of encrypted data from a content library.
VP8 encoding support includes settings for target bitrate, rate control, frame rate, token partitioning, error resilience, reconstruction and loop filters.
The platform API introduces VP8 encoder support in a range of formats, so you can take advantage of the best format for your content. VP8 encoding is available in software on all compatible devices running Android 4. For highest performance, the platform also supports hardware-accelerated VP8 encoding on capable devices. Starting in Android 4. For example, you can now direct a stream from an OpenGL ES surface to the encoder, rather than having to copy between buffers. Apps can use new media muxer APIs to combine elementary audio and video streams into a single output file.
Since Android 4. Notifications have long been a popular Android feature because they let users see information and updates from across the system, all in one place. Now in Android 4. You can access notifications through new APIs that let you register a notification listener service and with permission of the user, receive notifications as they are displayed in the status bar.
Notifications are delivered to you in full, with all details on the originating app, the post time, the content view and style, and priority.
You can evaluate fields of interest in the notifications, process or add context from your app, and route them for display in any way you choose. The new API gives you callbacks when a notification is added, updated, and removed either because the user dismissed it or the originating app withdrew it.
You'll be able to launch any intents attached to the notification or its actions, as well as dismiss it from the system, allowing your app to provide a complete user interface to notifications. Users remain in control of which apps can receive notifications. At any time, they can look in Settings to see which apps have notification access and enable or disable access as needed.
Notification access is disabled by default — apps can use a new Intent to take the user directly to the Settings to enable the listener service after installation. You can now create transparent overlays on top of Views and ViewGroups to render a temporary View hierarchy or transient animation effects without disturbing the underlying layout hierarchy.
Overlays are particularly useful when you want to create animations such as sliding a view outside of its container or dragging items on the screen without affecting the view hierarchy. A new layout mode lets you manage the positioning of Views inside ViewGroups according to their optical bounds , rather than their clip bounds. You can use the optical bounds layout mode to properly align widgets that use outer visual effects such as shadows and glows. Apps can now define the exit and entry animation types used on a window when the device is rotated.
You can set window properties to enable jump-cut , cross-fade , or standard window rotation. The system uses the custom animation types when the window is fullscreen and is not covered by other windows. Apps can set new orientation modes for Activities to ensure that they are displayed in the proper orientation when the device is flipped. Additionally, apps can use a new mode to lock the screen to its current orientation. This is useful for apps using the camera that want to disable rotation while shooting video.
Your app can listen for the intent and send the message to the caller over your messaging system. The intent includes the recipient caller as well as the message itself.
More parts of Android 4. More debugging information visible through the uiautomatorviewer tool. Pseudo-locales make it easier to test your app's localization. To assist you with managing date formatting across locales, Android 4. To help you test your app more easily in other locales, Android 4. Pseudo-locales simulate the language, script, and display characteristics associated with a locale or language group. Currently, you can test with a pseudo-locale for Accented English , which lets you see how your UI works with script accents and characters used in a variety of European languages.
The service receives the events and can process them as needed before they are passed to the system or other installed apps. Accessibility services can declare new capability attributes to describe what their services can do and what platform features they use.
For example, they can declare the capability to filter key events, retrieve window content, enable explore-by-touch, or enable web accessibility features. In some cases, services must declare a capability attribute before they can access related platform features. Building on the accessibility framework in Android 4. Through the UI automation framework you can perform basic operations, set rotation of the screen, generate input events, take screenshots, and much more. Apps can now configure the Wi-Fi credentials they need for connections to WPA2 enterprise access points.
Apps with permission to access and change Wi-Fi can configure authentication credentials for a variety of EAP and Phase 2 authentication methods. This protects the operating system against potential security vulnerabilities.
The KeyChain API now provides a method that allows applications to confirm that system-wide keys are bound to a hardware root of trust for the device. This provides a place to create or store private keys that cannot be exported off the device, even in the event of a root or kernel compromise.
Using the APIs, apps can create or store private keys that cannot be seen or used by other apps , and can be added to the keystore without any user interaction. The keystore provider provides the same security benefits that the KeyChain API provides for system-wide credentials, such as binding credentials to a device.
Private keys in the keystore cannot be exported off the device. This reduces root attack surface and likelihood of potential security vulnerabilities. Systrace uses a new command syntax and lets you collect more types of profiling data. You can now collect trace data from hardware modules , kernel functions , Dalvik VM including garbage collection, resources loading , and more.
There's minimal impact on the performance of your app, so timings reported give you an accurate view of what your app is doing. You can visualize app-specific events in a timeline in the Systrace output file and analyze the events in the context of other kernel and user space trace data.
Together with existing Systrace tags, custom app sections can give you new ways to understand the performance and behavior of your apps. On-screen GPU profiling in Android 4. You can choose to display profiling data as on-screen bar or line graphs , with colors indicating time spent creating drawing commands blue , issuing the commands orange , and waiting for the commands to complete yellow.
The system updates the on-screen graphs continuously, displaying a graph for each visible Activity, including the navigation bar and notification bar. If you see operations that cross the green line, you can analyze them further using Systrace and other tools. On devices running Android 4. This new policy helps you catch and fix such cases. Improvements in the hardware-accelerated 2D renderer make common animations such as scrolling and swiping smoother and faster.
The following steps show how to do this. Step8 Modify any of the remaining options if needed, and then click the OK button see Picture The detailed information for this device will be shown in a dialog box Picture22 , so developers can double check whether they are correct or not. The sample apk uses the baidu package to demonstrate how to do it Picture Step4 Check whether or not the app has been installed in the emulator successfully Picture Do you want a more convenient way to install and debug apps without having to type commands on the boring command line?
Eclipse can finish installation and execution automatically. The following steps show you how to use Eclipse to do that. Eclipse will first build the sample code and then launch the x86 KitKat emulator.
After that, sample codes will be installed and executed in the emulator. This article introduces how to build an Android development environment specifically for Intel processor-based devices. Using the x86 Android 4. Furthermore, debugging Android apps was shown by using ADT and the command line, and developers can choose their favorite method.
All rights reserved. Download Sdk For Android 4. Picture2 Step3 Save the file to the hard disk and then install it on your computer. The information in this guide is provided for instructional and educational purposes only. There is no guarantee that these instructions will work under your specific and unique circumstances.
Use these instructions at your own risk. We shall not hold any responsibility or liability for whatever happens to you or your device arising from your use of the info in this guide.
Read and understand the whole guide first before actually performing the instructions. Requirements Any Android device running Android 4.
For backup tips, check our guides on how to sync your data to the cloud and how to create local backups of your mobile data.
0コメント