And then I removed the Google account from the Galaxy Nexus and re-added it. I waited for the sync to complete. At this point, something I could not have predicted occurred.
Would you like to take a guess? Maybe even two? Alright, I'll tell you. The Galaxy Nexus running Jelly Bean no longer had a contact photo. At all. The photo on the Nexus 7 went from hi-res to low-res.
How's that for a curveball? I've run the same test a few times, and the result was the same every time. Here, zoom in if you want:. So Google sync now correctly syncs hi-res photos between Jelly Bean devices, the changes are not permanent, and the whole thing is a terrible mess.
Eventually, hi-resolution photos end up clobbered with low-res garbage. There was a lot of commotion around the quality bump in Jelly Bean, but it seems like Google still hasn't fixed the fundamental issue, and the self-destructive behavior continues.
It's possible that once every device moves to Jelly Bean, this will stop happening, but I believe it will take a lot more effort on Google's part to make sure that doesn't happen first.
It's a shame, really. Build; import android. TextUtils; import android. AttributeSet; import android. KeyEvent; import android. EditText; import java. Field; import java. Improve this answer. Constantinius Oleg Vaskevich Oleg Vaskevich Looks like the demo app crashes on 4. Add a comment. I tried this method. It does not work on Samsung Galaxy 4. I am using support EditText and am able to construct drawable. Still the problem persists on Jelly bean Galaxy Nexus.
I used an adaptation of the accepted answer - this one worked for me. The Overflow Blog. Podcast Explaining the semiconductor shortage, and how it might end. Does ES6 make JavaScript frameworks obsolete? Featured on Meta. Now live: A fully responsive profile. Visit chat. Linked 5. Related 2. Hot Network Questions. Apps that use standard View components inherit support for the new accessibility features automatically, without any changes in their code. Apps that use custom Views can use new accessibility node APIs to indicate the parts of the View that are of interest to accessibility services.
Apps can display text or handle text editing in left-to-right or right-to-left scripts. Apps can make use of new Arabic and Hebrew locales and associated fonts. The platform now supports user-installable keyboard maps , such as for additional international keyboards and special layout types. By default, Android 4. When users connect a keyboard, they can go to the Settings app and select one or more keymaps that they want to use for that keyboard. When typing, users can switch between keymaps using a shortcut ctrl-space.
You can create an app to publish additional keymaps to the system. The APK would include the keyboard layout resources in it, based on standard Android keymap format.
Developers can create custom notification styles like those shown in the examples above to display rich content and actions. Notifications have long been a unique and popular feature on Android. Apps can now display larger, richer notifications to users that can be expanded and collapsed with a pinch or swipe. Notifications support new types of content , including photos, have configurable priority, and can even include multiple actions.
Through an improved notification builder , apps can create notifications that use a larger area, up to dp in height. Three templated notification styles are available:. In addition to the templated styles, you can create your own notification styles using any remote View. Apps can add up to three actions to a notification, which are displayed below the notification content.
The actions let the users respond directly to the information in the notification in alternative ways. With expandable notifications, apps can give more information to the user, effortlessly and on demand. Users remain in control and can long-press any notification to get information about the sender and optionally disable further notifications from the app. App Widgets can resize automatically to fit the home screen and load different content as their sizes change.
New App Widget APIs let you take advantage of this to optimize your app widget content as the size of widgets changes. For example, a widget could display larger, richer graphics or additional functionality or options. Developers can still maintain control over maximum and minimum sizes and can update other widget options whenever needed. You can also supply separate landscape and portrait layouts for your widgets, which the system inflates as appropriate when the screen orientation changes.
App widgets can now be displayed in third party launchers and other host apps through a new bind Intent AppWidgetManager. At run time, as Activities are launched, the system extracts the Up navigation tree from the manifest file and automatically creates the Up affordance navigation in the action bar.
Developers who declare Up navigation in the manifest no longer need to manage navigation by callback at run time, although they can also do so if needed. Also available is a new TaskStackBuilder class that lets you quickly put together a synthetic task stack to start immediately or to use when an Activity is launched from a PendingIntent. Creating a synthetic task stack is especially useful when users launch Activities from remote views, such as from Home screen widgets and notifications, because it lets the developer provide a managed, consistent experience on Back navigation.
You can use a new helper class, ActivityOptions , to create and control the animation displayed when you launch your Activities. Through the helper class, you can specify custom animation resources to be used when the activity is launched, or request new zoom animations that start from any rectangle you specify on screen and that optionally include a thumbnail bitmap. New system UI flags in View let you to cleanly transition from a normal application UI with action bar, navigation bar, and system bar visible , to "lights out mode" with status bar and action bar hidden and navigation bar dimmed or "full screen mode" with status bar, action bar, and navigation bar all hidden.
GridLayout lets you structure the content of your remote views and manage child views alignments with a shallower UI hierarchy.
ViewStub is an invisible, zero-sized View that can be used to lazily inflate layout resources at runtime. From the preview, users can directly load the Live Wallpaper.
With Android 4. Apps can store and retrieve contact photos at that size or use any other size needed. The maximum photo size supported on specific devices may vary, so apps should query the built-in contacts provider at run time to obtain the max size for the current device.
Apps can register to be notified when any new input devices are attached, by USB, Bluetooth, or any other connection type. They can use this information to change state or capabilities as needed. For example, a game could receive notification that a new keyboard or joystick is attached, indicating the presence of a new player. Apps can query the device manager to enumerate all of the input devices currently attached and learn about the capabilities of each.
Among other capabilities, apps can now make use of any vibrator service associated with an attached input device, such as for Rumble Pak controllers.
Extending vsync across the Android framework leads to a more consistent framerate and a smooth, steady UI. So that apps also benefit, Android 4. This lets them optimize operations on the UI thread and provides a stable timebase for synchronization. The animation framework now uses vsync timing to automatically handle synchronization across animators. For specialized uses, apps can access vsync timing through APIs exposed by a new Choreographer class. Apps can request invalidation on the next vsync frame — a good way to schedule animation when the app is not using the animation framework.
For more advanced uses, apps can post a callback that the Choreographer class will run on the next frame. The animation framework now lets you define start and end actions to take when running ViewPropertyAnimator animations, to help synchronize them with other animations or actions in the application. The action can run any runnable object.
For example, the runnable might specify another animation to start when the previous one finishes. You can also now specify that a ViewPropertyAnimator use a layer during the course of its animation.
Previously, it was a best practice to animate complicated views by setting up a layer prior to starting an animation and then handling an onAnimationEnd event to remove the layer when the animation finishes. Now, the withLayer method on ViewPropertyAnimator simplifies this process with a single method call.
A new transition type in LayoutTransition enables you to automate animations in response to all layout changes in a ViewGroup. When the user triggers a transfer, Android Beam hands over from NFC to Bluetooth, making it really easy to manage the transfer of a file from one device to another.
Developers can take advantage of Wi-Fi network service discovery to build cross-platform or multiplayer games and application experiences. Using the service discovery API, apps can create and register any kind of service, for any other NSD-enabled device to discover. The service is advertised by multicast across the network using a human-readable string identifier, which lets user more easily identify the type of service.
Consumer devices can use the API to scan and discover services available from devices connected to the local Wi-Fi network. After discovery, apps can use the API to resolve the service to an IP address and port through which it can establish a socket connection.
You can take advantage of this API to build new features into your apps. For example, you could let users connect to a webcam, a printer, or an app on another mobile device that supports Wi-Fi peer-to-peer connections. Wi-Fi P2P is an ideal way to share media, photos, files and other types of data and sessions, even where there is no cell network or Wi-Fi available.
Pre-associated service discovery lets your apps get more useful information from nearby devices about the services they support, before they attempt to connect. Apps can initiate discovery for a specific service and filter the list of discovered devices to those that actually support the target service or application. On the other hand, your app can advertise the service it provides to other devices, which can discover it and then negotiate a connection.
This greatly simplifies discovery and pairing for users and lets apps take advantage of Wi-Fi P2P more effectively.
With Wi-Fi P2P service discovery, you can create apps and multiplayer games that can share photos, videos, gameplay, scores, or almost anything else — all without requiring any Internet or mobile network. Your users can connect using only a direct p2p connection, which avoids using mobile bandwidth.
Apps can query whether the current network is metered before beginning a large download that might otherwise be relatively expensive to the user.
Through the API, you can now get a clear picture of which networks are sensitive to data usage and manage your network activity accordingly. Apps can query the system to discover what low-level media codecs are available on the device and then and use them in the ways they need. For example, you can now create multiple instances of a media codec, queue input buffers, and receive output buffers in return.
In addition, the media codec framework supports protected content. Apps can query for an available codec that is able to play protected content with a DRM solution available on the device.
USB audio output support allows hardware vendors to build hardware such as audio docks that interface with Android devices. Android now lets you trigger audio recording based on the completion of an audio playback track. This is useful for situations such as playing back a tone to cue your users to begin speaking to record their voices. Multichannel audio lets you deliver rich media experiences to users for applications such as games, music apps, and video players.
For devices that do not have the supported hardware, Android automatically downmixes the audio to the number of channels that are supported by the device usually stereo. Developers can apply preprocessing effects to audio being recorded, such as to apply noise suppression for improving speech recording quality, echo cancellation for acoustic echo, and auto gain control for audio with inconsistent volume levels.
Apps that require high quality and clean audio recording will benefit from these preprocessors. MediaPlayer supports chaining audio streams together to play audio files without pauses. This is useful for apps that require seamless transitions between audio files such as music players to play albums with continuous tracks or games.
Support is built-in for wired headsets and a2dp bluetooth headsets and speakers, and you can add your own routing options within your own app. You can now sample textures in your Renderscript compute scripts, and new pragmas are available to define the floating point precision required by your scripts.
You can now debug your Renderscript compute scripts on xbased emulator and hardware devices. You can also define multiple root-style kernels in a single Renderscript source file.
To extend the capabilities of Android even further, several new services for Android are available. Google Cloud Messaging GCM is a service that lets developers send short message data to their users on Android devices, without needing a proprietary sync solution. GCM handles all the details of queuing messages and delivering them efficiently to the targeted Android devices. It supports message multicasting and can reach up to connected devices simultaneously with a single request.
It also supports message payloads , which means that in addition to sending tickle messages to an app on the device, developers can send up to 4K of data.
Google Cloud Messaging is completely free for all developers and sign-up is easy. See the Google Cloud Messaging page for registration, downloads, and documentation. Starting with Android 4. Smart app updates is a new feature of Google Play that introduces a better way of delivering app updates to devices. When developers publish an update, Google Play now delivers only the bits that have changed to devices, rather than the entire APK.
Google Play services helps developers to integrate Google services , such as authentication, into their apps delivered through Google Play. Google Play services is automatically provisioned to end user devices by Google Play, so all you need is a thin client library in your apps.
Because your app only contains the small client library, you can take advantage of these services without a big increase in download size and storage footprint. Also, Google Play will deliver regular updates to the services, without developers needing to publish app updates to take advantage of them.
Content and code samples on this page are subject to the licenses described in the Content License. Android Developers. Enhanced Accessibility New APIs for accessibility services let you handle gestures and manage accessibility focus as the user moves through the on-screen elements and navigation buttons using accessibility gestures, accessories, and other input.
Support for International Users. Resizable app widgets Android 4.
0コメント