navigate site menu

Become a member and get unlimited access to every course in the library. Try it free for 7 days

Android 4.1 SDK Jelly Bean New Features

Android 4.1 SDK Jelly Bean New Features

with Joseph Lowery

 


This course introduces the new features offered to developers and consumers in Android 4.1 Jelly Bean. Author Joseph Lowery first explains how you can expect the update to roll out to devices, and then shows how to install the Android SDK on Windows and Mac, select a device emulator, create a sample app, and prep it for publication on Google Play. Along the way, the course explores the smoother interface (codenamed Project Butter), notifications, advanced text manipulation, and security improvements that will be of interest to Android developers, and describes how those features translate for consumers on the device side.
Topics include:
  • Tasting the flavors of Jelly Bean
  • Developing with the updated media capabilities
  • Integrating input device feedback
  • Increasing accessibility
  • Setting up a Jelly Bean project
  • Testing your app on a device
  • Working with the emulator
  • Utilizing improved voice search
  • Interacting with Google services
  • Enabling near field communication with Android Beam

show more

author
Joseph Lowery
subject
Developer, Mobile Apps
software
Android
level
Intermediate
duration
1h 21m
released
Dec 07, 2012

Share this course

Ready to join? subscribe


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:00(music playing)
00:03Hi! I'm Joseph Lowery, here to welcome you to Android 4.1 SDK Jelly Bean New Features.
00:11We'll open with a general overview of what's fresh and hot in Android 4.1, and
00:17then I'll show you how to set up the SDK in both Windows and Mac.
00:22Next, we'll dive deep into what the developer can find and take advantage of
00:26in Jelly Bean, including a smoother UI, enhanced notifications, and beefed-up
00:31media capabilities.
00:33Then we'll go hands-on as I show you how to build your first app and test it in
00:38both a Jelly Bean enabled device. as well as an emulator. I'll also cover how to
00:43publish your Android apps and get into the Android marketplace, Google play.
00:49We'll close out the course with a closer look at Jelly Bean from the user's
00:53point of view with coverage of the enhanced search options, including voice
00:57search, Google services, and the joy of tapping and sharing via Android beam.
01:03Ready to grab a handful from the big Google jar and see what you got? Me too.
01:07Let's get to it.
Collapse this transcript
Course requirements
00:00To follow along with this course, the requirements are pretty straightforward.
00:04From a tools perspective, you'll need a code editor and, optionally, an Android 4.1
00:09enabled device. You can use whichever code editor you prefer.
00:13I'm going to be working with Eclipse on the Mac.
00:15It's a free editor for both Mac and Windows.
00:18Most of our demonstrations and testing will be done with the Galaxy Nexus, which
00:22currently comes with the Android 4.1 installed.
00:25We'll also be using an emulator that is installed as part of the Android SDK.
00:31That's it for tools.
00:32From a knowledge perspective, the more you're familiar with native development
00:36for Android devices the better.
00:37But this is not a code intensive course, and we'll step lightly through the
00:41building of a first app,
00:42so you can get your feet wet without much preparation.
Collapse this transcript
1. Overview
Tasting the flavors of Jelly Bean
00:00Before we drill down into the specifics, I wanted to give you a brief overview of
00:04Jelly Bean in general, and the new features in particular.
00:08Jelly Bean, or Android 4.1, was announced at the Google I/O conference on June 27, 2012.
00:16The first device with Jelly Bean was the Nexus 7 tablet.
00:20As of this recording, there have been two dot releases, 4.1.1, released on July 9,
00:27and then 4.1.2, released on October 9.
00:30Now there was a new version, version 4.2, which also has the same name, Jelly Bean,
00:37that was announced just before this recording.
00:39Unfortunately, there were no devices yet available with 4.2 installed, so it's
00:44not covered in this course.
00:46Generally, 4.1 was regarded as an incremental release and many new features built
00:53upon those previously released in version 4.0, including Project Butter, which is
00:58intended to provide a smoothness to user interaction, enhanced notifications, and
01:04an updated Android Beam for near field communication.
01:08There are numerous enhancements aimed at developers of which the most pervasive
01:13is perhaps Project Butter, which is designed to make transitions and other user
01:18interface operations smooth as butter.
01:21In order to achieve the smoothness, efforts were made on multiple fronts,
01:24including the VSync, or vertical sync timing, triple the buffering, adding touch
01:29anticipation, boosting the CPU on input, and adding a new tool called Systrace.
01:36We'll go into much greater detail about all of this in Chapter 3.
01:39There are also upgraded notifications, including enhancements to the notification
01:44builder, and the addition of templated styles with a custom style option and
01:50increased associated actions.
01:52There are also enhanced media capabilities, extended input controls,
01:57advanced text manipulations, increased accessibility, and the upgrading of
02:03security and network management.
02:05Again, all of these will be covered in much more detail in Chapter 3.
02:09For the users, there is an updated UI interaction, enhanced search (including
02:16voice search) increased Google services with the introduction of Google Now,
02:20better camera and video applications, improvements to web browsing and email, and
02:26much better near field communication with Android Beam.
02:29Whether you're an Android developer or Android user, there is a lot to love with
02:35the Jelly Bean release.
Collapse this transcript
A note on market availability
00:00Unlike Apple, which tightly controls all devices using its iOS operating system,
00:05Google, and the Android open source project which it leads, by contrast, has
00:10very limited control over who gets which version of the Android OS, and especially when.
00:16Android's release problems are two-tiered.
00:18When a new version is first released, it typically runs only on the Nexus line
00:23of products that are manufactured with a Google partner, like the Galaxy Nexus
00:28phone produced by Samsung, or the Nexus 7 tablet by ASUS.
00:33The Android release must then be picked up and fitted to work with a wide
00:38range of device manufacturers, 15 in the US and over 20 worldwide as of this recording.
00:44If there are any custom features or interface elements, those must be
00:48integrated into the release.
00:50Android has a nice gallery of devices on their site that you can find at
00:54android.com/devices.
00:56Once the manufacturers are done, it has to be turned over to the wireless
01:01networks, who have their own enhancements and testing to complete.
01:04When they're done they'll ultimately roll it out to the devices.
01:08The Nexus devices get the latest updates the soonest.
01:11Others may not get the update for many months, if ever.
01:15According to Google stats, Gingerbread which is Android 2.3, still has the bulk
01:20of market share, 55%.
01:23Currently Jelly Bean 4.1 is on the Galaxy Nexus, the Google Nexus S, Galaxy S
01:30III in Singapore, the HTC One X and HTC One S, and the Motorola Xoom, as well as the Droid.
01:39There is word that it's coming soon to the Samsung Galaxy Note, Note 2, S II,
01:44Ace 2, Beam, and Ace Plus.
01:47LG has announced that it will be on all of their 2012, models and Motorola has
01:52said that it will be on all of their US 2012 models and across their 2011 line.
01:58It's important for developers to understand the devices on which Jelly Bean is
02:03available, so that they can better gauge their market potential and structure
02:07the development plan accordingly.
Collapse this transcript
2. Installing the SDK
Setting up on Windows
00:00Installing the Android SDK for Jelly Bean is an essential task for
00:04anyone developing an app.
00:06In this video, we'll cover the steps for setting up the SDK on Windows, from scratch.
00:12If you've already installed the SDK, but not the 4.1 API, I'll point out how to do that.
00:18So I have opened here the developer.android.com/SDK/index.html page where we can
00:27get the Android SDK.
00:29You can see by looking at the big blue button that the website has already
00:33detected our operating system.
00:35If for any reason you need to download for another platform, you'll find a link
00:40if you scroll down just a little bit under the System Requirements and using an
00:45existing IDE listing.
00:47I want to point out that when you do this download you are not just getting the
00:51SDK, you're also getting Eclipse, along with the ADT, that's the Android Developer
00:58Tools plugin, the Android SDK Tools, the Android Platform-tools, the latest
01:04Android platform, and the latest Android system image for the emulator.
01:09So let's go ahead and start the download.
01:11I'll agree to the licensing agreement and click Download the SDK ADT.
01:17As with many applications these days the initial download is quite small.
01:22In this case, you're actually downloading a ZIP file that will contain the
01:26various component parts.
01:27Once the download is complete we'll be able to uncompress up and continue.
01:31Alright, looks like we're done.
01:32I'm going to go ahead and show in folder.
01:35So there's my download.
01:36I'll double-click to uncompress and you'll see a very handy link that appears up top
01:44that says For instructions about setting up your Android SDK for first time,
01:48read Setting Up the ADT Bundle.
01:50And if we go there you'll see a few steps outlined.
01:53So let's head back to Windows Explorer, and then I'm actually going to take this
01:57and put it on the desktop, so it will be pretty easy to find.
02:01You of course might want to put it in your root directory under another
02:05subfolder, perhaps one named Android or development.
02:09The move is complete, so let's go to desktop now.
02:13I'll open up that folder, and you can see there are two subfolders, eclipse and sdk.
02:19Let's go into sdk, and there you'll see five more subfolders. Drill down into
02:24tools, and once you see android, double-click that, and click Run.
02:31That will start the command prompt, which in turn will launch the Android SDK manager.
02:36Now I want to point out right away that you may notice that instead of Android
02:414.1, you see Android 4.2 at the top here.
02:46Google has just released this, literally the day that we are recording this course.
02:51Unfortunately, there are no devices available with 4.2 installed on them,
02:56so we can't do any real testing and demonstration with them.
02:59So we're going to keep our focus on Android 4.1, which is beginning to enjoy a
03:05lot of devices using it now.
03:07So I'll collapse Android 4.2 and open up Android 4.1.2.
03:14I'll select the main option, which will in turn choose all the other options there.
03:20And that's our latest platform that we're going to be developing for.
03:23We also want to select the earliest version that we want to develop for.
03:27And Google recommends that you choose android 2.2, which is Froyo, or frozen yogurt.
03:34Now I want to scroll down a little bit further to in the Extras folder and point
03:40out Google USB Driver.
03:43You'll want to select this one also, as that will be needed for doing any
03:47testing of your device.
03:49Okay, with all those options checked, click the Install13 packages button.
03:54And the next dialog box that appears asks which packages of the selected do you
04:00want to actually install?
04:01Now we want to go ahead and choose Accept All here, because we're going
04:05to install them all.
04:07This can take upto 10 to 15 minutes to actually download and do the setup.
04:11However, if you only have a limited amount of time to devote to this process
04:15when you do it, you can install one at a time. Alright!
04:19Let's go ahead and click Install, and the process will begin.
04:24Okay, the download is complete.
04:25And let's just verify that.
04:27I'll scroll down a little bit and now you can see the Google USB Driver is Installed.
04:31There is Android 2.2 Installed, and there's Android 4.1.2.
04:42Now you're ready to establish an emulator.
Collapse this transcript
Setting up on Mac
00:00Installing the Android SDK for Jelly Bean is an essential task for
00:04anyone developing an App.
00:06In this lesson we'll cover the steps for setting up the SDK on the Mac.
00:10And if you've already installed the SDK, but not the 4.1 API, I'll point out how to do that.
00:17Let's start by going to developer.android.com/SDK/index.html.
00:25The website automatically detects your platform.
00:28And the Big Blue button there is ready to be clicked.
00:31However, if you scroll down a little bit, you'll see a download for other
00:36platforms link, and you can use that to get the SDK for any other platforms.
00:40Now you'll notice that this button not only downloads the SDK, but it also
00:45downloads the ADT bundle for Mac.
00:48ADT stands for Android Developer Tools, and in this bundle you get everything
00:53that you need, Eclipse plus the ADT plugin, the Android SDK Tools, and more.
00:59So let's go ahead and get started.
01:01I'll click Download the SDK, and then agree to the license agreement, and click
01:07Download the Bundle.
01:10As with many applications these days the initial download is quite small.
01:14In this case you're actually downloading a ZIP file that contains the
01:17numerous tools we were talking about, the primary piece of which is the
01:21Android SDK Manager.
01:23Alright, now that it's downloaded,
01:27I'm going to Show in Finder, and there it is in my Downloads folder.
01:31I'll double-click it to uncompress.
01:35Now within the Android SDK MacOS X folder, you'll find a series of other folders.
01:42Let's drill down into tools and then select android.
01:47Now you could open this up with just Terminal, but I'm going to just
01:51double-click it and open up Terminal automatically.
01:56And once you're in the Android SDK Manager we'll need to still get the essential
02:01tools that we'll need.
02:02This, by the way, is where you'd come if you'd already had the Android SDK Manager
02:08installed previously and just wanted to get the Jelly Bean API.
02:12So since we're just starting, we're going to go ahead and select the Android SDK
02:17Platform Tools that you see here.
02:20Now Android 4.1.2, which is the latest version as of this recording, as you can
02:26see, is already selected for downloading and you can see also on the right that
02:30it's not installed yet.
02:31That's correct, we're going to want to get those, and you also want to get the
02:35earliest version of the API at your App will support.
02:38Google recommends that you choose Android 2.2, or Froyo, which is short for frozen yogurt.
02:45I want to stress that while Google recommends this as the earliest version for
02:50you to develop for, your needs may be different.
02:53Now we're also going to want to get an item or so under the Extras category.
02:57So let me expand Extras and then scroll down.
03:01I'm going to go ahead and pick up the Android Support Library.
03:05And you'll notice that there is a Google USB Driver here.
03:09We don't need to get that for the Mac, but if you're developing for Windows
03:12you would need that.
03:14Once you have made all of your selections, click the Install button. The next
03:19screen that's shown shows which packages that you actually want to install.
03:23The manager will pull out your selections and allow you to install them one at a
03:28time or all at once.
03:30We're going to install them all, so I'll click Accept All.
03:33Now although it will actually take 10 to 15 minutes for this to download and set
03:38up, in this lesson it will appear to take no time at all,
03:42thanks to the magic of editing.
03:44If you only have a limited amount of time to devote to this process when you do
03:48it, you should install one at a time.
03:50Alright, I'll click Install, and the downloading has begun.
03:55Well it looks like all my installations went through.
03:59Let me just verify by scrolling up, and there are all the 4.1.2 elements
04:05installed, excellent!
04:06Your SDK is set up on your Mac, and now you're ready to create an emulator.
Collapse this transcript
Establishing an emulator
00:00There are two ways to test your application during development.
00:04You can check it in the actual device by connecting a USB cable between your
00:09device and the computer, or you can use a software emulator.
00:13While an emulator is no real substitute for an actual device, it's definitely
00:18very useful for baseline development.
00:20In this video, I'll show you how to set up an Android emulator for Jelly Bean.
00:25Although I'm on the Mac here, the process is identical on the PC.
00:29The first thing you have to know is that in Android-speak, an emulator is known
00:34as the Android Virtual Device, or AVD.
00:37So, to start the process, I have my Android SDK Manager, which we installed in
00:42the previous movie, opened and up and running.
00:45I'm going to go to the Menu, choose Tools > Manage AVDs.
00:51The Android Virtual Device Manager dialog box will open.
00:54You can see that there are no AVDs or emulators listed here.
00:59In the real world development situation, you'd be creating many different
01:04emulators, targeting different OS versions and different screen resolutions as well.
01:09We're going to set up a very basic one to get you started.
01:12The initial step is to click New.
01:16In the Create New Android Virtual Device dialog box, first enter the name of your emulator.
01:21We'll call this one Jelly_Bean.
01:25Notice that I'm using an underscore here.
01:28Now, let's set the Target from the list of available options.
01:32We're going to choose Android 4.1.2, which is the latest version of Jelly Bean.
01:39You'll notice the API Level is number 16.
01:42Google has this distinct numbering system that it applies to all of its
01:47operating system versions.
01:49The next option is CPU/ABI.
01:52CPU is familiar to most, whether you're a TRON fan or not, as an abbreviation
01:57for Central Processing Unit.
01:59But what about ABI?
02:01ABI is short for Application Binary Interface.
02:05This can vary by device.
02:07But the most common in Android is ARM, processor manufacturer like Intel.
02:12And if I open up the CPU/ABI list, you'll see ARM listed there as well as the Intel Atom.
02:20Let's choose ARM.
02:21Now, we're going to enter in the memory size for the SD card next.
02:25My Galaxy Nexus has about 16 gigs of memory.
02:28But let's say I want to target a wider range of devices.
02:32So, I'll enter in 10240 or 10 gigs.
02:37The next option is very important if you use the emulator a lot because it will
02:41save you a ton of time.
02:43Android emulators can create snapshots of where you are in the device, like if
02:48you're in a particular app, and it can automatically save and load the snapshot
02:53whenever you start the emulator.
02:55For all that to work, you have to choose the Snapshot: Enabled checkbox.
03:01Now, we're ready to set the resolution of your emulator, which is found under the Skin category.
03:07As you can see, there are a bunch of preset options as well as the ability to
03:12enter custom values.
03:13We're going to go with the Default option for this basic emulator.
03:18Now, under Hardware here, you'll see a number of properties and values and
03:21you can also add the new ones in, including any of these from the list that you see here.
03:27So, if you need to test specific features, this is where you would add in those properties.
03:32I'm going to just leave the default values here, and we're finally ready to
03:36create our new emulator.
03:37So I'll click Create AVD.
03:40Once that process is completed, and I'll warn you, it can take a bit of time,
03:44we'll see a new listing in the manage AVDs dialog box.
03:50And there is our result, our Jelly_Bean AVD has been created. I'll click OK.
03:55You can see the listing there up top in the AVD Manager dialog box.
04:00If need be, you can select it and edit to make any changes.
04:04But let's go ahead and fire this puppy up.
04:07So with that selected, I'll click Start.
04:10This will bring up the Launch Options dialog box.
04:13The first option, Scale display to real size, allows you to change the size of the
04:19emulator according to your screen.
04:21In my situation, leaving this option unselected works out fine.
04:25The Wipe user data option that you see here really only comes into play after
04:30you've been testing for a good while.
04:32Since we're just starting, we can leave that deselected.
04:35Now, of the next two options, I'm going to deselect Launch from snapshot for
04:40this time, because we don't have a snapshot first, but I definitely want to have
04:44Save to snapshot selected.
04:46Let's click Launch.
04:51Once we're there, I'm going to quit the emulator so I can demonstrate how
04:54useful the Snapshot function is.
04:56So I'll just go up and click Close.
04:59And then, close the Starting Android Emulator dialog box.
05:03Now, let's start it again.
05:04And you'll see just how quickly the emulator will start up.
05:07I have Jelly_Bean selected, I click Start.
05:11This time, I'm actually going to choose Launch from snapshot as one of
05:14the launch options. Click Launch.
05:17Good job!
Collapse this transcript
3. What's New in 4.1 for the Developer
Exploring a smoother UI with Project Butter
00:00If you've worked with previous Android OS versions, one of the first
00:05things you'll notice with a Jelly Bean device is how you don't notice the
00:09user interface so much.
00:11That's because it's far smoother than ever before.
00:14There are no jerky stutter steps as you transition from one screen to the next,
00:18it just makes the move quickly and effortlessly.
00:21Although of course, there was a tremendous effort to make it like this, much of
00:25which Google engineers group under the heading of Project Butter.
00:30Before we drill down to the why, let's take a quick look at the overall effect.
00:35Here I have my Galaxy Nexus with Jelly Bean 4.1.
00:39Let's go to the App screen first.
00:41Now just the introduction of all the apps appears much smoother to me.
00:47Now I'll swipe to the second page. First, regular speed. If you watch closely,
00:52you can see how the app icons on the second page fade up and grow simultaneously
00:57into position as the first page of apps is moved off screen.
01:01Let me go back and forth a couple of times, so you can see this.
01:04Let's go back to the first page, second page, first page, second page.
01:12Now let me do it really slowly so you can see just how smooth it is.
01:16I am on the second page now and I'm going to swipe back to the first page,
01:20and even moving really slowly, you can see how smoothly the fade and transitions are.
01:27For another demo, let's go back to Home, so I'll tap Home, and now I'm going to
01:32swipe to my third page, first one swipe and then another, where I've got some
01:37quick contacts set up of some folks here at lynda.com.
01:41Watch how smoothly and quickly Matt's picture and info come up when I tap his name.
01:47I'll tap below to send it back.
01:49Now on earlier versions of the OS, this action was relatively slow and quite
01:53uneven, almost jerky. No more with Jelly Bean.
01:58You'll find this same smoothness everywhere you go in the Jelly Bean device now.
02:02Let's pop that hood and get a better idea of how this is all happening.
02:06The goal of Project Butter was to make device interactions as smooth as butter.
02:12To accomplish this, the team engineered a multilevel integrated approach
02:16that affected three key areas: the screen display, the touch interface, and
02:22the underlying CPU.
02:23Let's take a look at the screen display first.
02:27The Frame Rate increased to 60 frames per second.
02:30This is largely due to the improved vSync, or vertical sync, screen display timing.
02:36vSync keeps everything marching to a very specific beat, every 16 milliseconds,
02:42including transitions, app rendering, and screen refresh, so everything is snappy
02:47in addition to being smooth.
02:49Reacting to a user's touch has been beefed up as well.
02:53Now a feature called Touch Responsiveness has been introduced that actually
02:58anticipates where the user will tap next, thereby preparing the action event to
03:03trigger more quickly.
03:04The enhancement to vSync also impacts on touch and reduces latency.
03:09The CPU and related components have also been brought into Project Butter.
03:15Animations, including page transitions and scrolling, have all been
03:18polished through triple buffering, which combines CPU, GPU, and display
03:24for smoother actions.
03:26Jelly Bean also provides a CPU input boost for touch events to further
03:32reduce any latency.
03:34Developers can see for themselves how the system reacts to their app through a
03:38new tool introduced in Jelly Bean called systrace.
03:41Systrace collects data regarding system activities from the Linux kernel, and
03:45displays that info as a group of vertical time-series graphs, which you can see
03:50an example of by going to the Systrace page in the Debugging section of
03:54developer.android.com.
03:57For more details, see the Systrace help page.
04:00Without a doubt, Jelly Bean, through the combined efforts of Project Butter, have
04:05made the Android interface the smoothest yet.
Collapse this transcript
Communicating with notifications
00:01Notifications are one of the major differentiators between phones and smartphones.
00:06The standard old-style phones make and receive calls, as do smartphones.
00:11But smartphones are also capable of receiving messages, or if you prefer, notices,
00:16from a variety of sources.
00:18Now these notifications can be a reminder of an upcoming event or a heads-up
00:22for incoming email.
00:24As I found out during the recent Hurricane Sandy, they can also deliver
00:28alerts on extreme weather.
00:30Notifications have received a major overhaul in Jelly Bean, and not just in look
00:34and feel, but also functionality. Let's have a look.
00:39You display any notifications by swiping down from the top of the screen that
00:43shows the top row of icons, like the Home screen that you see here.
00:47Any notifications that you receive are indicated with small icons on the left.
00:51Watch what happens to the background when I swipe the notifications into view.
00:56See how the background of the home screen darkens and if I go back up,
01:02the darkness reverses.
01:03Now I have a few example notifications set up.
01:06Let me swipe down the Notification screen completely.
01:10If you were to compare this Jelly Bean notification screen to previous versions,
01:14you'd see how different it is, both in overall design and specific typography.
01:19The text is thinner, but larger, making it more readable.
01:23As you'll see in a bit, Jelly Bean offers a number of templated styles,
01:28including a series of big styles.
01:31One of my notifications is a Screen capture.
01:34I'll show you how to do that natively in Jelly Bean in the Updated Media
01:38Capabilities lesson later in this chapter.
01:41But what I wanted to show you here is how you can expand individual notices.
01:46I'll do a two-finger swipe on the screen grab notice to open it up.
01:50In the latest version of Jelly Bean, they've implemented the single-finger swipe
01:54as well, but I find the two finger gesture to be much more reliable.
01:58Now I can tap the screen if I want to go see the full image and possibly edit
02:03it, but I also have other actions I can take,
02:05right from the Notification screen. If I click the Share icon, I'm given a
02:10number of options to choose from.
02:12The Share icon is considered an action and you can have up to three different
02:17actions for each notification.
02:20So how do you take advantage of all of these newly added
02:23notification possibilities?
02:25You use Jelly Bean's new Java class Notification.Builder.
02:29The Notification.Builder class is, of course, for notification objects, and
02:34makes it easy to create notices using the system's template for a standard look and feel.
02:39With this Java class, you can quickly set up your notice title, content, icon,
02:45and even sounds, and you can make your notifications much larger, up to 256 pixels tall.
02:52As I said earlier, you can also specify actions.
02:56This is done through the addAction method.
02:58addAction takes three parameters, an icon, a titl,e and a pendingintent.
03:05A pendingintent is basically an operation that normally takes place in another
03:10app, like sharing a screen grab.
03:13Any notification can have up to three actions, as I mentioned before.
03:18Jelly Bean's enhanced notification abilities can help your app break out of its
03:22box and keep the user informed with up-to-the-minute interactive messages.
Collapse this transcript
Exploring updated media capabilities
00:00The media capabilities in Jelly Bean will truly help Android devices reach their
00:04potential as full-featured multimedia systems.
00:08And in this lesson, I'll explain why that is from a developer's perspective.
00:12But before we get to the list of expanded media options, I wanted to show you
00:17how to take advantage of another Jelly Bean feature, native screen grabs.
00:21Screen capture is essential for any app developer because screen grabs are used
00:26in everything from documentation to marketing.
00:29Until now, you had to rely on a third party app to handle this essential
00:34chore, but no longer.
00:35Let me demonstrate by going to my quick content screen. I'll swipe twice to go
00:40there from home, and now to initiate a screen capture, you press the lower side
00:45of the Volume button and the Power button simultaneously.
00:50You'll hear the camera snap, there is a bit of a flash, and you'll see the image
00:54briefly on your screen.
00:56Now let me go to the Gallery, which is swiping backwards and then tapping on
01:01Gallery, and there you'll see shots from the camera and also screenshots in
01:06two separate albums.
01:07So let me tap the Screenshot option.
01:12Now from here, I have some key options laid out up top.
01:16I can share the image, send it in a message, or trash it.
01:20If I choose Share, and I'll tap that, you can see I have some initial options:
01:26Gmail, Bluetooth, Picasa and a few more if I tap See all, Google+ and Bump.
01:34Let me clear that menu by tapping outside of it.
01:36Now the screen capture area is just an extension of the gallery.
01:40So I have all the same editing options that I do there.
01:43Let me tap to activate the top menu and then click Settings over on the right,
01:47and there you'll see Slideshow, Edit, Crop, and so forth.
01:52Let's try out cropping.
01:53So I'll click Crop, and there you can see the highlighted area with the
01:59four screen grab buttons, let me go so that I have just that area of the
02:04central image highlighted.
02:10There is the right and the top and now I'll do the left, and let me tighten up
02:18that bottom just a little bit.
02:20Once that's done, I click OK in the upper right-hand corner.
02:24It saves the picture and there's my new cropped image.
02:28Native screen capture is pretty cool, but what about the other
02:32media capabilities?
02:33Well, they can be divided into General Media Options and enhanced
02:38audio capabilities.
02:39Under the General Media options, Android now has low-level MediaCodec access.
02:46This opens the door for apps to incorporate both software and hardware codecs, so
02:51the range of formats that can be played back is greatly enhanced.
02:54There is also a new MediaRouter, which can determine where audio is output.
03:00Instead of just a headphone jack, there is also the possibly now of accessing
03:04the USB port, which extends docking and Bluetooth options.
03:10On the audio front, there have been a lot of upgrades.
03:14As I mentioned, there is now the possibility of USB audio.
03:18Developers can also trigger recording after audio playback, which is great for
03:23prompting your users to start their own recording.
03:27The new multichannel support opens the door for richer media experiences for
03:32game players, music lovers, and video aficionados.
03:36Preprocessing audio is also built in, which allows for effects like noise
03:41suppression, auto volume game, and acoustic echo. And if you like working out or
03:47just taking long walks to an endless stream of music, you're going to love the
03:51new audio chaining capabilities.
03:54If you're a developer of media-related apps, you've got to be psyched for
03:57all these new options.
03:59And if you develop apps of any kind, you've got to love the native screen
04:03capture functionality.
Collapse this transcript
Integrating input devices
00:00The more your Android device can recognize and manage external devices, the
00:04greater its range as an entertainment or even educational hub.
00:08Jelly Bean has added and enhanced a few key input device associations that make
00:14it possible for your device to have a more prominent role as a hub.
00:18Your app can now register to be notified if a particular input device, such as a
00:23new Joystick, is attached to the main unit.
00:26This input device awareness registration is handled by the InputManager.registerInputDeviceListener() method.
00:35You can find more details about the InputManager and that particular method on
00:40the InputManager page that's found within the Hardware Input category of Android reference.
00:46Once your app knows that an input device has been added, it needs to know
00:51what that device can do.
00:52Now this functionality is handled by the InputDevice class, which was added in Jelly Bean.
00:59The InputDevice class can determine a wide range of device properties,
01:04including the source,
01:05so your app will know what kind of device is added, whether it's a trackball,
01:09gamepad, joystick, keyboard, or drawing stylus.
01:14And then you can twirl down for even more definition.
01:17For example, if it's a keyboard, is it full alphabetic keyboard or partial
01:23non-alphabetic keyboard?
01:25And if it's a joystick or similar device, what can it process in terms of motion
01:29range, orientation, X and Y axes, pressure, size, or touch?
01:36You'll find all these particulars laid out on the InputDevice.html page found
01:41within the View category of Android reference.
01:45Another input device-related capability that I want to discuss is a little bit
01:49esoteric I'll grant you, but it's pretty cool and surprisingly useful.
01:53I have become a big fan of the use of the vibrate feedback mechanism that's
01:57built into Android devices whenever you type a key or tap an icon.
02:02Now, if your input device supports vibration, like a game controller with rumble
02:07pack capabilities, you can detect that with the InputDevice.hasVibrator()
02:12method and then get that service with the InputDevice.getVibrator() method. Pretty cool.
02:19These new capabilities go a long way towards broadening the appeal of Android
02:23apps that use external input devices.
02:26If you're in that camp, congratulations!
Collapse this transcript
Advanced text manipulation
00:00Some new features in Jelly Bean serve to expand the technological markets
00:04for Android devices,
00:06like the ability to detect and work with new input devices covered in
00:10the previous lesson.
00:11Jelly Bean has also expanded their market internationally by providing support
00:16for bi-directional and vertical text, as well as other enhancements.
00:20Let me show you a quick demo.
00:23I've sent myself a little self-congratulatory note where the text in Hebrew says mazel tov.
00:28Note that the characters running right to left instead of the Western
00:32language left to right.
00:34If you don't speak Hebrew, you've to take my word for it that the characters are
00:38running right to left, instead of the Western language-style left right.
00:43Bi-directional support is available in either standard displays or in editing mode.
00:48In developer jargon that means that bi-directional support is available in both
00:52TextView, that's Android's text editor class, and EditText elements,
00:57it's subclass that permits the text to be edited.
01:00There are other text-related enhancements as well.
01:03Vertical text is now supported in a WebView instance, which is Android's class
01:09for displaying all or part of a webpage.
01:12Synthetic bold is available when the language doesn't have bold glyphs.
01:17Japanese-specific glyphs are rendered when the system language is set to Japanese.
01:22Arabic glyphs have now been optimized for both WebView and TextView instances.
01:27And there's also updated Unicode 6 support.
01:31Finally, it's now not only possible for Jelly Bean users to read an increasing
01:36range of language types, it's also possible for them to enter text through any
01:41user-installed keyboard.
01:43This feature supplements 27 current international keymaps that are now
01:48accessible to users with external keyboards through the Language and Input
01:53category of Settings.
01:55Users can even set up a shortcut, Ctrl+Space, to switch between keymaps.
02:00Apps can publish additional keymaps to the system via the
02:05android.hardware.input.action. QUERY_KEYBOARD_LAYOUTS constant.
02:13You'll find more info about this in the Android reference on the Hardware
02:17Input Manager page.
02:19While these text handling advances are not a set of features that will impact
02:23the full spectrum of developers, they will definitely extend the Android
02:28devices world.
Collapse this transcript
Increasing accessibility
00:00Accessibility is, or should be, a major concern of every web and app developer.
00:06Google has made accessibility a primary focus of Jelly Bean and followed through
00:11with built-in tools, APIs, and even a developer center dedicated to the topic.
00:17Let's take a look at the system wide accessibility features to start off.
00:21For the vision impaired, Android 4.1 includes a screen reader service called
00:26TalkBack to describe the results of actions,
00:29as well as a companion feature called Explore by Touch that audibly describes
00:34the interface as you touch the various elements.
00:37To enable it, you will first have to open Settings, that I have here on one of my home screens.
00:43So I'll swipe over to that and tap Settings and then I'll scroll down, almost to
00:49the bottom, where I see Accessibility, and tap that.
00:53Next tap TalkBack right up top.
00:56When that opens, tap the ON/OFF switch in the upper right, by default it's set to OFF.
01:02That will display a dialog box asking you to confirm your choice.
01:07Once you tap OK, TalkBack will kick in. So let's tap OK.
01:12Now every action that I take will be echoed by TalkBack.
01:15So if I change my Ringtone volume,
01:18 [Audio]
01:22I'm told of the action and this specifies to what percentage I change it.
01:25Let me raise the volume a little bit.
01:27 [Audio]
01:31Now if I want to navigate through the system there are a series of special
01:35gestures you can use.
01:37To use an icon, I'll need to tap it not once but twice.
01:41Let's click the TalkBack settings at the bottom of the page to go to that screen.
01:47I find it's best for most icons and options to highlight it first and then double tap.
01:53So I'll tap it once to highlight.
01:54 [Audio]
01:56And you can hear TalkBack read it back, and then again twice.
02:00 [Audio]
02:06Now here is a pretty big list of options.
02:09It says there are 16 at all and we're seeing 1 through 9.
02:12So how do you see the rest?
02:15Well, you can't use a simple swipe up to scroll, that would cause the last item
02:20you touched to be read.
02:22To scroll when you're in TalkBack mode, you'll need to use a two finger swipe.
02:26 [Audio]
02:31I want to point out two options in the TalkBack settings.
02:34The first is Launch "Explore by touch" tutorial, found almost at the bottom of the screen.
02:40We won't go into it, but I recommend that you work your way through it in order
02:44to better understand the wide range of gestures used in this mode.
02:48Now I do want to go into Developer Settings, however.
02:51Let met first highlight it.
02:53 [Audio]
02:54And now I'll double tap it.
02:57 [Audio]
03:01As you can see, and hear, there are three options here which you can set to trace
03:06what's happening in TalkBack mode during a debugging process.
03:10First you can set the Log Output Level. If I tap it once.
03:15 [Audio]
03:17And double tap to open.
03:21 [Audio]
03:23You can see all seven levels ranging from NONE to VERBOSE. Let me Cancel it.
03:30 [Audio]
03:31You can also highlight the event sources in the log to see what's triggering the TalkBack.
03:36And finally, you can display the actual speech output in the log.
03:40Now if you're following along on your device for the first time, you may be
03:43wondering how to get back to the previous screen.
03:45Well, you can try double-tap back.
03:49That's often a little tricky.
03:51Luckily, there's a special gesture for going back a page, and that's swipe down
03:56and to the left, just like you're going to the previous page of a book.
04:00 [Audio]
04:03Let's do that one more time.
04:05 [Audio]
04:08And now I'm going to highlight the ON/OFF switch.
04:11 [Audio]
04:13And then double tap to disable the feature.
04:16 [Audio]
04:22To confirm, I'll highlight OK.
04:24 [Audio]
04:25And then double tap.
04:28I mentioned that Google has a great deal of information about accessibility.
04:33You can find that on the developerandroid.com site.
04:36There's detailed information about accessibility APIs, how to build an
04:41accessibility service, and even a checklist.
04:44I think you'll find, like I did, that it's a terrific resource.
Collapse this transcript
Exploring security improvements
00:00A wide range of experts agree that Jelly Bean is the most secure version of
00:04Android released to date.
00:06In this lesson, we'll take a look at the primary security enhancements, along
00:11with a personal security measure.
00:14Android 4.1 is the first Android OS to properly implement address space layout
00:20randomization, or ASLR, security.
00:24In brief, ASLR randomizes where memory processes are mapped,
00:29thus reducing the probability of successful hacking. This update has been judged
00:34by the expert to be a vast improvement over the initial implementation in Ice
00:39Cream Sandwich, or version 4.0.
00:42Another under the hood security enhancement has to do with the low-level system logs.
00:47Previously, any app had permission to read the logs of other apps and thus glean
00:53any sensitive data there.
00:55This permission known as read_logs has been removed in Jelly Bean.
01:00I want to show you another Jelly Bean security enhancement that has a
01:03more personal impact.
01:05I've ever lost my phone, but my daughter has, multiple times.
01:09Luckily, she outgrew the habit before phones had lock screens.
01:13Now if she lost her phone and it was found, to the person who found it couldn't get
01:18pass the lock screen to get the owner info.
01:21Jelly Bean now has a setting that allows you to display a lock screen message
01:26like the one shown here at the top of my phone that gives a number to call.
01:30Let me show you where that option is, and at the same time, I'll add an offer of a cash reward.
01:38So how that I add that to my lock screen?
01:40Well, first I'll unlock the phone.
01:43Now let me go into Settings, and in the Personal section, I'll tap Security, and
01:52now I'll tap Owner info.
01:54There you can see my current message.
01:56Let me move the cursor to the end of the message and add in my Cash Reward option.
02:08So now I can tap Home, turn off the phone, and then when I turn it back on, there
02:16at the top of the lock screen you can see my new message.
02:18I discovered one thing while I was trying out different messages that I want to share.
02:24If the message is too long to display on a single line, it scrolls across like a
02:28kind of ticker-tape. So don't delay!
02:30Add that lock screen message today.
Collapse this transcript
4. Creating a Sample App
Setting up the project
00:00In this lesson, we're going to walk through the steps of building your first
00:04app with Android 4.1.
00:06Now we have Eclipse already installed, and I have it up and running here.
00:10Even though it says ADT, which is short for the Android Development Tools, this
00:16is Eclipse. And we're going to start by going to the first icon that you see
00:21here, clicking on New, and we want to select the Wizard under the Android
00:27section, choose Android Application Project, and then click Next.
00:32Now we're going to call this one Jelly Bean One, and use the word One instead of the number 1.
00:39Numbers aren't accepted in the name.
00:40Now, I also want to change my Package Name.
00:44Normally, you would put in your website name to replace 'example' here. I am going
00:48to put in lynda, and all the other entries here are right, and they have picked
00:53up these values from the SDK.
00:54Now you do have a number of options with the theme.
00:58Here we have Holo Light with a Dark Action Bar.
01:00If I open this up a little bit, you can see that there is a number of other varieties.
01:05Once we get into the app, you'll have a lot more options.
01:08So I would say just go with this default for now, and let's click Next.
01:13On this screen, we'll configure the project and again I am going to keep all the
01:18default values, and click Next.
01:20Now we get to configure the launcher_icon, and you can use the ones that's
01:25provided, or you can switch to Clip Art, and Choose one from some of the
01:31available Clip Art items that you have here, or go with just straight Text.
01:38I'm going to go back to Image and just use a provided image, let's click Next.
01:44Now we get to select the kind of Activity for our app.
01:47Again, there are a number of versions.
01:49FullScreenActivity, LoginActivity, a MasterDetailFlow, SettingsActivity.
01:56We're going to go with Blank because this is just a simple, basic app, and I'll click Next.
02:03Now because I've chosen BlankActivity, I get these options.
02:07Let's leave them all at their defaults again and click Finish.
02:13After Eclipse has finished setting up the files, you should have a
02:16representation of your project, Jelly Bean One in my case, displayed. And now
02:22your setup is done, And you're ready to work on the app.
Collapse this transcript
Testing your app on a device
00:00In the previous lesson, we set up all the necessary files in Eclipse, and
00:04created our first Android app using Jelly Bean.
00:08In this lesson, I'll show you how to test your newly created app in a device.
00:13So here I have the files in ADT/Eclipse, carried over from the previous lesson.
00:19It's really beyond the scope of this course to do any actual application
00:22development, but let's change the Text here just to make sure we're not getting
00:26some canned content.
00:28So, I am going to select my Text, Hello world!
00:31and then over in the Properties Panel, I'll go to where it says Text, and I'm
00:35going to change this from a variable, hello_world, to straight text, and let's
00:42just make it, Hey There, Brave New World!
00:51When I press Tab, you can see that it's changed on the app.
00:56Now let's go to File > Save All, just to incorporate those changes.
01:00Now before I connect my device to the computer, I want to make sure that the
01:06two can communicate.
01:07So let me go to my device and power it up, I'll unlock it, and then swipe to my
01:13second homepage, where my Settings are, tap Settings, and then down at the bottom
01:18of the screen, tap Developer options.
01:23I want to make sure that USB debugging is checked, it is.
01:28So looks like I'm good to go.
01:30Finally, let's go back to Home, and now we're ready to connect the device to
01:37the computer with a USB cable, and I get a couple of messages on the system
01:42indicating that everything is up and running, and now we're ready in Eclipse to click Play.
01:49You can see down in the lower right that it's launching Jelly Bean One, and
01:54now if we take a look at the device, there's our app, showing on the screen, success!
02:00So, to show that this is recognized as an app, let me tap Home, and now I'll go
02:06into APPS, and there on the APPS screen, you can see my icon, for the APP.
02:12So that's how you set up a device for testing.
02:16In the next lesson, I'll show you how to work with the emulator instead.
Collapse this transcript
Working with the emulator
00:00As noted before, it's great to test on your device, but sometimes an emulator is handier.
00:05If you haven't setup your Android emulator yet, please review Chapter 2's lesson
00:10Establishing an emulator.
00:12This lesson continues the work we've done in the previous two lessons of this chapter.
00:17The easiest way to view your work in an emulator, is if you're developing with
00:21ADT/Eclipse, as we are, and then to launch the emulator from within Eclipse.
00:27So I'm going to go up to Window > Andorid Virtual Device Manager, open that up,
00:34and there you see the emulator we created, Jelly_Bean, so I'll select that,
00:37and then click Start.
00:38Now I'm going to deselect Launch from snapshot, so I can begin with a clean slate
00:44here, now I click Launch.
00:52So, let's go to Home, and then the App screen, and there is Jelly Bean One, in
00:59the second the last row on left, good job.
01:02Now, you can debug your App in both the device and the emulator.
Collapse this transcript
5. Publishing Your Android Apps
Prepping for publication
00:00Once your app is ready, you'll want to publish it on Google Play, the Android marketplace.
00:06Before you can actually publish the app, however, there's a fair amount of
00:09preparation involved. This lesson goes through the prepublication process, so
00:15you'll know what you need to do.
00:17First you'll need to register for a Publisher account.
00:20You can start the process by going to http://play.google.com/apps/publish.
00:27The registration process is very straightforward and currently costs $25.
00:32To begin the registration you'll need to log in with your Google Account ID.
00:38Because I'm already registered as an Android Developer, I'm taken to the
00:42Android Developer Console, which is exactly where you'll land after you have
00:46completed the registration.
00:48We'll return to this location in the next lesson in this chapter, Getting into
00:51Google Play, but for now we need to go over the rest of your preparation.
00:57There are three main steps of preparation. First, you need to gather various
01:02supporting materials. Next, you'll need to configure your app properly.
01:07Last, you need to create a final build.
01:10Let's take a closer look at each of these steps.
01:12The primary item you'll need to get is a digitally-signed certificate that you
01:18as the developer own.
01:20This cryptographic key is required.
01:23For more details on how to get such a key see the Obtain a suitable private key
01:28section of the app signing HTML page, under publishing.
01:33Other materials include an application icon, which is a 32-bit PNG file, with
01:38alpha transparency, output to a variety of sizes.
01:43Google has a terrific guide for creating such icons, including all the
01:47required dimensions.
01:50I strongly recommend that you include a EULA, or End-User License Agreement.
01:55A EULA will help protect your intellectual property as well as yourself and your organization.
02:00There are many examples of EULAs online.
02:03Additionally, you should spend a fair amount of time creating your marketing and
02:07promotional materials, including screenshots, and marketing text.
02:12Next, you want to configure your app. This is the precursor to actually compiling
02:17the final build for upload.
02:20When you're configuring your app, first and foremost you want to make sure
02:23you've got a good solid name.
02:26Once the app is distributed you can't change the name. You can set the name in
02:30the manifest file of your project.
02:32You will need to disable any logging and debugging options in your code. This
02:38includes deleting calls to Log() methods, removing Android:debuggable
02:42attributes, as well as any tracing calls.
02:46To ensure proper compiling make certain the project directory is clean
02:50without any orphan files.
02:52You'll also need to update your manifest permissions, icons, and version
02:56parameters, if required.
02:57Of course, you should ensure that your app is compatible across all desired
03:02devices, covering multiple screens, and tablets.
03:05And you'll want to be positive that any external URLs access are the
03:10correct production ones.
03:12Finally, if your app is a commercial one, you should implement Google Play
03:17Licensing, so you can control access.
03:19The last preparatory step is to actually create your build.
03:24If you're developing your project with Eclipse and the ADT plug-in, and you've
03:28completed all your other preparation, this is pretty much a breeze.
03:32Let's go over to Eclipse, so I show you how to kick it off.
03:35In Eclipse, I have my Project Explorer showing, and my project Jelly Bean One is
03:41selected. I'll go up to File > Export.
03:47In the Export dialog box I want to twirl open Android, and then choose Export
03:53Android Application, and click Next.
03:56Once the project check is complete, if there are no errors found, you can go
04:01ahead and click Next.
04:03From here you just follow the rest of the steps in the Wizard. Because I have
04:07not created a digitally signed certificate for Jelly Bean One, our little test
04:11app, this is as far as I can go.
04:14Once the export Wizard has been completed, your app will be compiled, signed, and
04:19ready for distribution, which we'll cover in the next lesson.
Collapse this transcript
Getting into Google Play
00:00Getting into the premier Android marketplace, Google Play, is ultimately
00:05straightforward, although it may seem a bit overwhelming at times.
00:09In this lesson I'll walk you through the entire application so you can get a
00:13better understanding of the process and what's required.
00:17To do this, I am going to take advantage of a bit of a back door that currently
00:22exists in the Google Play application process.
00:25Google does have a new application process in beta as part of their overhaul of
00:29the developer console.
00:31So there's no guarantee that this accessibility will be around forever.
00:35But in this lesson you will be able to see all the steps.
00:39So I'm here in the Android Developer Console, and you can see I don't have an app
00:43published on Play yet.
00:44So I am going to go ahead and click the Upload Application button to start the process.
00:50Now here's the back door.
00:52Don't click Choose File and upload any file, instead just click Close.
00:58As you can see we're now in the Edit Application screen, where we have access to all the fields.
01:04There are two tabs up top, Product details, where we'll spend most of our time in
01:09this lesson, and APK files.
01:12Let's take a quick look at the APK files tab.
01:16This tab lists all the Android Application Package, or APK, files already uploaded,
01:22as well as giving you an opportunity to upload more.
01:26Now let's head back to Product details and the meat of the lesson.
01:30I'll scroll down just a bit so we can see the first of the six different
01:33sections of the application.
01:35We begin with uploading your assets.
01:38This area gives a good breakdown of what's required and the accepted formats.
01:42You will need to upload at least two screen shots.
01:46Some of those marketing images discussed in the previous lessons.
01:50These images are displayed on the details pages in Google Play.
01:54You will also need to upload a high-res application icon.
01:59This is not, as you might think, the same thing as your launcher icon, although it
02:03could be a higher resolution version of that image.
02:07Next are a couple of optional uploads, promotional graphic and feature graphic.
02:11The promotional graphic is a much smaller image, 180x120 pixels, while the
02:18feature should be 1024x500.
02:21Although they're technically optional, Google strongly recommends you submit
02:26them so your app can be properly featured.
02:29You also have the option to include a link to a promotional video hosted on YouTube.
02:34Next up, Privacy Policy.
02:36It's considered a best practice to have a privacy policy, and here you can
02:41enter a link to your own.
02:43Finally, there is a checkbox to opt out of general marketing.
02:46I don't know about you, but I tend to think that the more marketing, the better.
02:50So I personally would uncheck this option.
02:53The next section is Listing details.
02:56First, you can choose which languages your app supports and then set the default language.
03:02Next, you enter your app's title, which must be 30 characters or less.
03:07The other text areas in this section allow you to enter the general description,
03:12recent changes, especially helpful if the app is been upgraded, as well as a bit
03:17of promotional text.
03:20You'll need to declare whether your app is an application or a game.
03:24Once you do, you can further choose its category.
03:26I am going to go ahead and set this one as an application, so you can see the
03:31whole wide range of categories available.
03:34So now if I click on the category list, you can see that there is a good number
03:38of options to choose from.
03:40Let's scroll down so we can see Publishing options, the next category.
03:45The first option here is Copy Protection.
03:49This option will soon be deprecated and as the note indicates, using the
03:53licensing services is recommended.
03:56Specifying the content rating is generally done for games, and most applications
04:01you would select everyone.
04:03However, there are a number of exceptions.
04:06If your app request the user's location, it cannot use the Everyone option,
04:11but it should use Low Maturity.
04:14If your app shares location, it should be rated Medium or High Maturity. The
04:20other circumstance that would exclude an app from being rated for everyone is if
04:25it hosts communication between users.
04:28If your app does, it will need a Medium or High Maturity rating.
04:32Next up is Pricing.
04:34Unless you have set up a merchant account with Google check out, your app will be free.
04:39The following section covers the countries you want to make your app available in.
04:44You can choose to allow All Countries, specify specific ones, or if you scroll
04:50down a little bit more, select all but certain countries.
04:55Next up the supported devices list, this will be populated by the entries in
05:00your manifest file, and since we haven't uploaded an APK yet, it's blank here.
05:05You will want to enter your contact details next, so the marketing department
05:09can give you a heads-up when those marketing opportunities arise.
05:14The penultimate section allows your app to communicate with your servers via the
05:19Google Cloud Messaging service.
05:20You will need what's called a simple API Key to work with the service.
05:25And the final section at the bottom of the application confirms that your app
05:30meets Android content guidelines and that your app complies with the US export laws.
05:35There is a helpful link here for you to learn more.
05:39It's a lengthy application, I'll grant you, but access to the Google Play
05:42marketplace is worth it.
05:43Good luck!
Collapse this transcript
6. What's New in 4.1 for the User
Exploring updated UI interaction
00:00Jelly Bean brings a rich and surprisingly robust variety of user interface
00:05enhancements to the table.
00:07We've touched on a few of these in other lessons in this course, like
00:10notifications and the smoothness of Project Butter.
00:14If you missed those check out Chapter 3,
00:17What's New in 4.1 for the developer.
00:19In this lesson we are going to pile on with some more specific ways in which
00:25user interaction has gotten an upgrade with Jelly Bean.
00:28You don't have to look any further than the lock screen to see the first of these changes.
00:34Notice how a circle of dots softly fading out follows my finger around the
00:40screen, until I land on one of the targets, like unlock.
00:45As I mentioned earlier, pretty much everything is so much smoother now
00:49with Project Butter.
00:50However, it's also noticeable how much faster things are when compared
00:55to previous versions.
00:57Let's go from the Homescreen to the App Drawer.
01:01Let's go back and forth so you can really see it.
01:03I will tap Home and then Apps again.
01:07Other interactions are just as fast.
01:10Let's bring up recent apps. Pretty close to instantaneous, wouldn't you say? And
01:15dismissing them by tapping recent apps again, is just as clean.
01:19Android 4.1 is not just faster, it's more precise, and best of all lets you make the call.
01:27Now when you add a new widget to your home screen, other widgets get out of the
01:32way, and you can see exactly where in the preview screen.
01:35Let's bring in a couple of widgets, so you can see what I am talking about.
01:39So I am here in the Apps drawer and I will tap the WIDGETS tab. Let's say I want
01:44to add the clock to my home screen, so I will press and hold that until the
01:48Home screen preview comes up.
01:50Now I can place it in the center, when I let go, there it is.
01:55If I decide I want to move it, I can change it's placement by pressing and
01:59holding on it, and now, should I move it to either corner, the icons that are
02:04there, like the Camera icon, gets out of the way. Pretty sweet!
02:09So let me move that back to the center and then I will drag the camera icon
02:14back down into place.
02:16This make-room functionality, it's also available in the preview screen.
02:20Let's add one more widget.
02:23So I will go back to the Apps Drawer, make sure I am on the WIDGETS, tab and this
02:27time I'm going to click and hold Calendar, and on the Preview screen I am going
02:32to put it right in the center there below the clock.
02:35You can see the clock jump up to make room.
02:38Removal of icons is cleaner to.
02:40Let me get rid of the two widgets I just added.
02:43First, I am going to press and hold the clock, you can see the X followed by a
02:48Remove that appears at the top.
02:51When I drag the clock to that remove, both turn red, and when I release, its gone.
02:57I kind of took my time with that one. Let me get rid of the calendar in real
03:02time so you can see how fast and smooth it really is.
03:05So I am going to click and hold the calendar and then just swipe it up. Gone.
03:11Not only are physical interactions cleaner, faster, and smoother, but Google has
03:16really brought voice interaction into reality by greatly expanding Android voice
03:22commands in Jelly Bean.
03:23We will explore voice search in detail in a separate lesson.
03:28But I wanted to demonstrate a few of the more practical possibilities.
03:32I have got Google search at the top of my home screen, so I will just tap the
03:36microphone and then give a voice command for a reminder.
03:40The key to successful voice commands is lack of hesitation.
03:46Note to self, pick up eggs, milk, and dog food.
03:50And there's my note.
03:52Once the saving of the note has been complete it sends an e-mail to myself with
03:56both the text message and an audio recording of my note.
03:59Of course you can do more than communicate with yourself. Let's send a text
04:04using voice commands.
04:07Send text to Matt Fishbach, message I'm running 15 minutes late.
04:14Click Send message and the message is off.
04:17Just like the phrase 'note to self,' the words 'send text to' constitute a voice
04:23action and the word 'message' is a parameter.
04:26You can find a list of voice action in your Android user guide.
04:30There are tones of practical voice commands, but let's close this lesson with a
04:35totally impractical one.
04:38If you've ever seen any movie where the characters love to fly planes, one of
04:41them almost always does a barrel roll. Well, so can Jelly Bean.
04:47Do a barrel roll. Hours of fun, right?
04:51After all the hard work of enhancing 4.1 user interactions, I guess the engineers
04:56just needed to cut loose.
Collapse this transcript
Exploring the enhanced search and improved voice search
00:00As you might imagine, search on any Google device is a really big deal, and
00:05Jelly Bean has stepped up to the plate and seriously taken Google Search to
00:09the next level by making it more accessible with richer results and more
00:13direct user interactions.
00:16Google Search is very available in Jelly Bean,
00:18right from the get-go. Here on the lock screen, I can unlock the phone and go
00:24directly to search by swiping up.
00:26Google Search, as we've seen, is also available as a widget.
00:30You can see this when I just tap Home and it is placed up top by default on
00:35Google co-branded devices, like the Galaxy Nexus.
00:40Standard search is as robust as the desktop version with a compatible set of results.
00:46Let me tap into the Search field and then I'll enter a search term, I'll type
00:51Jelly Bean, and hit Search.
00:55By default the Web results are initially displayed, but I can easily switch to
00:59images by tapping that at the bottom of the screen.
01:02Google Search on a Jelly Bean device integrates whatever device functionality
01:07is available, like geolocation.
01:10I'm currently recording this lesson at the lynda.com headquarters in
01:13Carpinteria, California.
01:15Watch what happens when I enter a search for best bbq nearby.
01:20I'll clear the text field.
01:23I'll enter best bbq nearby.
01:27When I click the Search icon, I'm given a Google Map representation of places
01:32for best BBQ near Carpinteria, California and the ZIP code.
01:36And we have a good listing going from A to G.
01:41Let's turn to the most amazing enhancement to Google Search, Voice Search.
01:47As seen in the previous lesson, Google has seriously ramped up the voice commands.
01:52Nowhere is that more evident than in Voice Search.
01:56Let's run through a few examples.
01:58I'm in a go back to Home just to clear the screen.
02:01Now I can start for search by clicking the microphone as I did in the
02:05previous lesson, or activate the Search field and then just say Google, best
02:13vegan restaurant nearby.
02:14And there are my results ready to be contacted or located on the map.
02:22Let's try some more specific types of searches, like a webpage.
02:26With Voice Search activated, I can use the open keyword, open lynda.com.
02:34The Web results are initially displayed. What about images?
02:39You can go directly to Google's image search by saying, show pictures of, and then
02:44the subject, like this: show pictures of golden retrievers. Very nice!
02:52How about definitions? Define sagacious?
02:59 [Video]
03:04Voice Search can also handle weather.
03:08What's the weather tomorrow in New York City?
03:12 [Video]
03:16What about conversions?
03:17How many kilometers are in a mile?
03:21 [Video]
03:27Of course, because engineers are engineers, there are some inevitable, shall we
03:32say, sagacious answers. Who founded Apple?
03:36 [Video]
03:43For me, Google Search and especially Voice Search, has taken on an
03:47evolutionary leap in Jelly Bean.
Collapse this transcript
Interacting with Google services
00:00If I tap the Google icon on my Home screen, I see a variety of Google
00:05services, everything from Gmail to Messenger, and all of them have been upgraded for Jelly Bean.
00:12Moreover, an entirely new aggregator of Google services has been implemented.
00:17It's called Google Now, and it's extremely cool.
00:20Let's start the ball rolling at Google+.
00:23With my Google collection on the Home screen, I'll tap Google+ to open it up.
00:29The look and feel of the stream has been snazzed up a bit.
00:32The first time I swipe through the stream, the large images seem to just float into place.
00:39On Tablets, the Google+ stream has a new, magazine-style layout.
00:44I'll click the Google collection, icon and then Google+, and here you can see
00:50two columns of streams side-by-side for a good portion of the page, and as I
00:55move up, then it extends to a horizontal single column, and it breaks it up,
00:59again, like a magazine layout.
01:02You can also now add and manage events right from Google+.
01:06I'll tap the Google+ icon in the upper left, which opens up a side nav. From there,
01:12I'll tap Events, and once it loads, I'll tap Create an event.
01:18From here I could proceed to invite folks to a movie night or other event.
01:23Any related post or photos are saved to the Event, so I can revisit them at any time.
01:28This ability is available on both phone and Tablet.
01:32Let me show you another Google app that's been given a facelift for Jelly Bean
01:36powered tablets, Gmail.
01:39So I'll tap HOME, Google, and then Gmail.
01:44The new layout makes it easy to see a full list of messages, all maintaining
01:49access to all my folders and labels.
01:53Now there's another Google owned service that's been given an upgrade, and that's YouTube.
01:57So let's go HOME, Google, YouTube.
02:03When we open up in YouTube, you'll see my Channel Feed.
02:06Now you can see which subscriptions are shown in your Feed by clicking YouTube
02:10in the upper left, and there you see the account that I have, and the three
02:14Channels that I've subscribed to.
02:17Let's see what's happening on the lynda channel. Nice!
02:20Now let's turn to that new addition to the Google family I mentioned, Google Now.
02:25So I'm going to switch back to the phone to demo this part, and go to Home.
02:30You won't find a Google Now icon in the Google collection, as you can see.
02:35Google Now is more integrated than that.
02:37To get to Google Now, tap into Google Search.
02:42If the keyboard opens up, just swipe it down.
02:45Now the first of what Google calls cards comes up, showing local weather, based
02:50on your automatically-gathered location.
02:53Essentially, Google Now combines your location, Search History, Calendar,
02:58and other recurring uses of your device to deliver relevant info to you automatically.
03:04If you're concerned about privacy, you should know that Google Now is an opt-in service.
03:09The first time you see it,
03:10you're given a brief tour of the possibilities, and then presented with an
03:14option to opt in or not.
03:16As you can see, I'm in.
03:17Let me show you some of the other cards available.
03:20So I'm going to scroll down to the bottom of the page and click Show sample cards.
03:27There are 10 sample cards here, ranging from Traffic, to the time back home
03:33when you're traveling.
03:34Some, like Traffic, are based on your location. Others, like Flight, are tied to
03:41searches you've done.
03:42Flight, for example, gives you a status update of your flight.
03:46Each card has its own settings.
03:49Let's look at the settings for Sports.
03:53I'm currently following the Yankees and the Giants.
03:57If I wanted to add the Lakers, I just tap Add team, and then enter an L. This
04:03will open up a range of different teams that start with an L, and there's my
04:09Los Angeles Lakers.
04:12So I'll select that, and now the latest score will pop up during the next Lakers game.
04:19There's tons more functionality built into Google Now, as is evident when I
04:23scroll down the list.
04:25If you want to see everything that's available, just tap Card list under Other
04:30cards at the bottom of the sample cards.
04:33The more you use Google Search and related services like Gmail, the more
04:37Google Now becomes.
04:39Have fun exploring!
Collapse this transcript
Exploring the versatile high-quality camera and video functionality
00:00Cameras on Smart Phones have become almost as important as the phones themselves.
00:05Jelly Bean brought a number of improvements to both camera and video
00:09functionality, making it far easier to move between taking pictures and viewing them.
00:15Let me open up the camera.
00:16When I start the camera, I have three basic imaging options.
00:20Let me tap here to show you the three possibilities: camera, video, and panorama.
00:27I'll tap again to close it.
00:29There is also a digital zoom.
00:32As I slide the control to the right, it zooms in, and when I slide to the left, it
00:37zooms out, and I can take a shot with one tap.
00:43In one corner you can see the last picture taken.
00:46No matter which imaging option I'm using, I can now go directly to the gallery by
00:51swiping from right to left.
00:54There's the first image.
00:55So let me switch orientation to horizontal.
00:59Now if I continue swiping I can go through my other gallery items, which include
01:04a video and a panorama shot.
01:07Camera performance has improved greatly as well.
01:12Take a look at this next image, taken a few moments before sunset.
01:16If I spread by fingers to zoom in you can really see some fantastic detail,
01:23almost right down to the sneakers on this jogger.
01:26The panorama shot is equally impressive.
01:30Let me zoom in a bit, and then I'll swipe to scroll through the long panorama.
01:37Great detail throughout.
01:38Let me zoom back out to move to the next gallery item.
01:44Here's a video that illustrates the zoom feature.
01:48 [Video]
01:49You can see some folks playing on the beach.
01:52Ironically, they seem to be taking pictures too. And there is the last kite of the day.
02:01Navigation within the gallery has been enhanced as well.
02:05The gallery goes into filmstrip mode.
02:08So I can easily navigate through all of my images.
02:12Inevitably, there will be images or videos that I don't want to keep.
02:16So how do you remove them?
02:17When you're in filmstrip mode, you can do it with a simple swipe up.
02:23When I swipe up, the image is flown off screen, and should you change your mind, it's
02:28a single tap to undo that action.
02:30Of course, the actual camera and video specs will vary according to your
02:34device, but the software enhancements in Jelly Bean, for me, really bring
02:38imaging into focus.
Collapse this transcript
Robust web browsing
00:00Web browsing got kicked up a notch with a variety of enhancements to Google Chrome.
00:05Let's take a look at some of them on the tablet. From the Home screen, I'll tap
00:09the Google collection and then tab Chrome.
00:12The first thing you'll probably notice is the effect Project Butter has had on
00:16Chrome. As I add a couple of tabs and then remove them, notice how smooth the
00:23animation transitions are.
00:25Let me open up the lynda.com site for my most visited list.
00:30I'll also open up another tab, and then choose NASA's Astronomy Picture of the
00:36Day, known to Astronomy Geeks as APOD.
00:41Now that I have three tabs open, I can demonstrate the new swipe technique for
00:45navigating between tabs.
00:48I'll start on one side of the screen, outside of the website windows, and then swipe across.
00:54As I do the tab switch.
00:56I can go part of the way to move to the next tab, and then if I do it again
01:01first tab. Or going back the other way, I can swipe quickly across the entire
01:07screen, and go to my last tab. This Jelly Bean enhancement really speeds up web browsing.
01:14Voice search has been integrated into chrome for Jelly Bean. Let me demonstrate.
01:19I'll click the microphone and then ask for the w3c website, w3c.org.
01:30And there's my listing, and when I click on it, comes up right away.
01:34You can also browse the web without leaving a trace, via the Incognito tab
01:39option, from Settings.
01:41So I'll click Settings here, and then click New Incognito tab.
01:46Despite the menu entry, it actually opens up a whole new window, and once you're
01:51on the Incognito window, any site you visit will not be recorded in your
01:55browser or search history.
01:57Note the cloak and dagger dude in the upper left corner.
02:00This indicates that it's an Incognito Window.
02:03So let's go to an appropriate site.
02:05So I entered cia.gov, and it first goes to the cia.gov mobile site.
02:14But what if I wanted to see the full site?
02:16Well, let me click Settings again, and then I can choose Request desktop site,
02:21and you can see the browser working, and it's gone back out to pick up cia.gov,
02:29and there is a complete cia.gov site, ready for your undercover browsing.
02:34You'll browse faster, smoother, and smarter, with the Jelly Bean upgrades
02:39in Chrome.
Collapse this transcript
Near Field Communication with Android Beam
00:00NFC, or Near Field Communication, is exactly what it sounds like, if you speak tech.
00:06When two devices are near each other, they can communicate.
00:09This feature was first introduced in Android 4.0 as Android Beam, and beefed up in Jelly Bean.
00:16Now you can easily send images, and even video, from one device to another.
00:21Beam now uses bluetooth to do the file transfer.
00:24You need to make sure that your bluetooth is on on both devices.
00:28You'll also want make sure the NFC is enabled, although it should be by default.
00:33To transfer an image, you need to go to the Gallery. So I am going to Home, and
00:38then on my second page, Gallery, and there's my image.
00:43The next up is to hold the two devices back to back, and in a second, you will
00:50hear a vibration and see a message, Touch to beam. When you see that, tap the
00:54picture, you will get a confirmation tone from the device,
01:01and now, if you go to the Notifications on the tablet quick enough, you'll see an
01:06incoming Beam message, and once that finished, you'll see it says Beam complete,
01:13touch to view. So let's tap that, and there you have it.
01:16Wireless transfer via the Android Beam.
Collapse this transcript
Conclusion
Next steps
00:00I hope you got a lot out of Android 4.1 SDK Jelly Bean New Features, and find it
00:06inspiring in your app development.
00:09Be sure to check out the other Android related courses in the lynda.com library.
Collapse this transcript


Suggested courses to watch next:



Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 100,984 instructional videos.

start free trial learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 1,943 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.


site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked