Home > Articles > Programming > Java

Android 4.1 (Jelly Bean) for Developers

📄 Contents

  1. Project Butter Takes Center Stage / Do I Need to Update My Native Android Apps? / Do I Need to Update My Web Apps?
  2. Developer Tool Improvements
  • Print
  • + Share This
Jelly Bean may be a minor point release on the Android continuum, but it doesn't lack for features that native Android app developers, mobile web developers, or NDK developers should be aware of. Lauren Darcy and Shane Conder suggest that you use this honeymoon period before users get their hands on Jelly Bean to become familiar with the new Android tools and SDK features.
Like this article? We recommend

For some, the Jelly Bean (Android 4.1) release at Google I/O was a surprise. As a minor point release from Ice Cream Sandwich (Android 4.0), there are not that many new features for developers, but there are a lot of user-level improvements from a performance perspective. Still, it's good to check what areas of the Android SDK were modified and make sure your apps will work as well or better than they did prior to the update.

(images © 2012 Google)

Project Butter Takes Center Stage

The Android team has been spending a lot of effort in recent releases to focus on improving the user experience across the platform. This means fewer new features, but improvements to existing features in terms of performance, responsiveness, reliability, and visual appeal. In many cases, app developers need not do much, if anything, to harness these new features, unlike some past updates like hardware acceleration, which may have required the developer to make minor tweaks and rebuild their apps.

The Jelly Bean release continues to focus on improving the user's experience with the platform. Nicknamed Project Butter, the Android platform has benefited from enhancements like these:

  •   Graphical timing improvements (put simply, much more of the system synchronized to the screen redraws)
  •   Predictive touch (instead of scrolling to where your finger was at a screen redraw, it scrolls to where it thinks your finger will be when the screen is actually displayed)
  •   Enhanced tools to find places in apps where improvements can be made (presumably, the Android team used these new tools on built-in apps to make them much smoother and more responsive, too)

Together, these improvements give users a fast, responsive, and buttery experience they expect from modern devices.

Many of the performance enhancements were applied across the platform and do not require developers to update their apps. That said, Google has made it clear that developers should not assume they can simply write an app, publish it, and forget about it.

They expect developers to be routinely and consistently updating their apps when new versions of the platform are released. In other words, they want third-party developer apps to be maintained and improved, and there are plenty of opportunities to do this with the new Jelly Bean release.

Do I Need to Update My Native Android Apps?

That's the real question you're asking yourself, right? Will I have to update my app? Will this release break my app? Usually, the answer is you don't have to update your apps unless you want to; the Android team tries to make new platform versions compatible with legacy apps (within reason).

That said, it's always a good idea to take advantage of this time before users get the new Jelly Bean release to ensure that your apps play nice on the updated platform.

Here are some areas to pay special attention to in your apps because the APIs have had some significant changes:

  •   If your app uses notifications, you should know that the notification bar and pane has been greatly improved for more feature-rich notifications. Check out the Notification.Builder class (android.app.Notification.Builder) for more details on how you can create different styles of notifications with multiple actions and different priorities. You can also include more complex controls like graphics and GridLayout in your notifications.
  •   If your app includes App Widgets, this area of the SDK has received improvements as well. New controls like GridLayout and ViewStub can now be used in App Widgets. App Widgets automatically resize themselves based on where they are placed. The App Widget host dictates the layout features of the App Widget, and can adjust content based on the size and orientation of the space available. See classes such as AppWidgetHostView (android.appwidget.AppWidgetHostView) for updates.
  •   If your app leveraged Google's Cloud-To-Device Messaging (C2DM) service, this service has been deprecated and you will need to migrate to the new Google Cloud Messaging (GCM) service. You can find out more about the GCM service here: http://developer.android.com/guide/google/gcm/index.html
  •   If your application leverages the Support Library (aka the Compatibility Package) for backwards compatibility, you should be aware that a new revision (Revision 9) was released in June along with the Jelly Bean SDK updates. Certain Jelly Bean features have been rolled into the package, along with many bug fixes to existing Support Library features.
  •   If your application uses Renderscript, you'll find new features in this area as well. You can also now debug your Renderscript scripts.
  •   If your application uses NFC (Android Beam), this technology was improved in Android 4.1 to allow for Bluetooth data transfer—a key feature that developers have been waiting for.
  •   If your application uses Wi-Fi APIs, there have been numerous improvements in this area as well. Android 4.1 includes both multicast DNS-based service discovery and improved support for Wi-Fi Direct pre-associated service discovery. These features greatly simplify Wi-Fi connectivity.
  •   If your app is composed of multiple Activity classes that the user transitions through, you will likely want to look into the improved navigation support added in Jelly Bean for handling "Up" navigation via a new XML attribute called android:parentActivityName. For a more general discussion of Back and Up navigation guidelines, see the Android Design website at http://developer.android.com/design/patterns/navigation.html
  •   If your app relies upon other input devices, it can register for connection events from, and query the capabilities of, input devices that are connected to the user's devices. This is particularly useful for games that support external game pads.
  •   If you use custom View controls in your app, this is always an area to review when new Android SDK versions are released. Jelly Bean includes numerous changes to the accessibility framework that impact View components, so you will want to review your custom View controls to make sure they jive with the improved accessibility framework features that will automatically be available in standard View controls.
  •   If your app is data-centric, you'll want to look at the improvements to the app network bandwidth management. Developers can now programmatically check whether or not the user is connected to a metered network with the isActiveNetworkMetered() method of the ConnectivityManager class before initiating data-intensive operations that might cost the user. Note that this feature has also been rolled into the latest Support Library for backwards compatibility.
  •   If your app has Live Wallpapers, there is an improved way to work with wallpaper previews. See the WallpaperManager class (android.app.WallpaperManager) for details.
  •   From a publishing perspective, the platform has improved internationalization support for non-Roman languages. If your app is appropriate for Arabic, Hebrew, and Asian audiences, you may want to review your UI and start selling to these locales. For example, users can now manipulate text in TextView and EditText controls bi-directionally (left-to-right or right-to-left) and the WebView has support for vertical text like Japanese. There is also support for custom keyboard maps for different types of international keyboards.
  •   If your app plays back audio that can benefit from multi-channel output, then it should be updated with the newly added support in Android 4.1 for 5.1 audio output (available on devices that support it). And you need not worry about hardware that doesn't support it; the output will be down-mixed as necessary. Several other audio enhancements are available that, in effect, make the audio experience more buttery. For example, finishing the playback of audio can trigger recording audio for seamless record prompting, audio files can be chained for seamless playback of linked tracks, and audio preprocessing is now available.

Do I Need to Update My Web Apps?

If you've got a web app that targets Android devices, you'll also want to do a sanity check. There are a number of android Browser and Webview updates that will affect apps that leverage HTML5, CSS3, and JavaScript. In addition, devices are now beginning to ship with Chrome for Android as the default web browser.

If you're using Flash in your web apps, it's time to either switch to a Flash-only solution using Adobe AIR or drop Flash completely in favor of other technologies like HTML5. Adobe has announced that it will not support the Flash browser plug-in on Android 4.1 and above. Note also that Chrome for Android does not support the Flash browser plug-in.

  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020