New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Start learning with our library of video tutorials taught by experts. Get started

Android SDK: Local Data Storage
Illustration by Don Barnett

Creating an Android virtual device


From:

Android SDK: Local Data Storage

with David Gassner

Video: Creating an Android virtual device

I'll be using the Android emulator to test and debug my applications throughout this video series. Here I'll show you the steps I follow to create my emulator. I'll go to the ADT menu and choose Window > Android Virtual Device Manager. You can either go to the Device Definitions screen and choose one of the preexisting definitions or you can create a definition from scratch on the Android Virtual Devices tab. I will start from that tab and click New.
Expand all | Collapse all
  1. 6m 34s
    1. Welcome
      50s
    2. What you should know before starting this course
      2m 11s
    3. Using the exercise files
      3m 33s
  2. 21m 6s
    1. Exploring local data storage options
      5m 58s
    2. Configuring Eclipse and the Android Developer Tools
      5m 29s
    3. Creating an Android virtual device
      3m 23s
    4. Creating a new Android project
      6m 16s
  3. 31m 30s
    1. Using preferences in Android apps
      5m 28s
    2. Defining preferences with Java
      9m 31s
    3. Defining shared preferences with an activity
      10m 50s
    4. Listening for changes to shared preferences
      5m 41s
  4. 51m 13s
    1. Creating and reading files in internal storage
      10m 18s
    2. Creating and reading JSON data files
      9m 48s
    3. Working with files in external storage
      11m 22s
    4. Parsing a read-only XML file with XmlPullParser
      11m 46s
    5. Parsing a read-only XML file with JDOM
      7m 59s
  5. 1h 8m
    1. Creating a new SQLite database
      2m 52s
    2. Defining a database with SQLiteOpenHelper
      12m 12s
    3. Managing the database with a DataSource class
      9m 38s
    4. Inserting data into a database table
      10m 29s
    5. Retrieving and displaying data
      11m 44s
    6. Importing data from XML to SQLite
      5m 15s
    7. Filtering and sorting data
      9m 27s
    8. Accessing a database from the command line
      6m 46s
  6. 42m 0s
    1. Improving the data display
      9m 29s
    2. Passing user-selected data to a detail activity
      11m 36s
    3. Working with multiple database tables
      10m 28s
    4. Deleting data from database tables
      10m 27s
  7. 49s
    1. Where to go from here
      49s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
Android SDK: Local Data Storage
3h 41m Intermediate Jan 25, 2013

Viewers: in countries Watching now:

Take your Android programming skills to the next level with the Android built-in framework that enables local data management in text files and SQLite-based relational databases. This course shows you how to create datacentric apps for Android devices, using SQLite, Java, and the built-in android.database packages. Author David Gassner describes how to define shared preferences, work with JSON and XML files in internal and external data stores, and create new local SQLite databases.

Topics include:
  • Exploring local data storage options
  • Creating an Android virtual device
  • Starting a new project
  • Defining preferences with Java and activities
  • Creating and reading JSON and XML data files
  • Creating a new SQLite database
  • Inserting and retrieving data in the database
Subjects:
Developer Mobile Apps Programming Languages
Software:
Android Java
Author:
David Gassner

Creating an Android virtual device

I'll be using the Android emulator to test and debug my applications throughout this video series. Here I'll show you the steps I follow to create my emulator. I'll go to the ADT menu and choose Window > Android Virtual Device Manager. You can either go to the Device Definitions screen and choose one of the preexisting definitions or you can create a definition from scratch on the Android Virtual Devices tab. I will start from that tab and click New.

I'll name my new Android virtual device JellyBean. In this version of ADT, there are four specific device definitions for actual devices: the Nexus 7, the Galaxy Nexus, the Nexus S, and the Nexus One. Then there are a bunch of predefined device definitions that are generic. I'm going to start with a fairly small device, which will make everything very readable on my screen. It will be the 3.2 QVGA device definition, which uses a medium pixel density.

I'm setting my target to the only SDK that I have installed: Android 4.2. Because all of the exercise files for this course are defined for that version of the SDK, I recommend that you do the same. Make sure that you've selected the options to allow hardware keyboard input. This will let you type values in from your own keyboard and the skin that displays the skin with hardware controls. I'll add a virtual SD card with a size of 64, and then I'll click OK and that creates the virtual device.

Then I'll click on the virtual device and I'll click Start. On the Launch Options screen, I'll accept all of the defaults and click Launch. That starts up your emulator. Now this will be for a very small cellphone, and if you want to emulate a more recent device, such as the Nexus 7, you can choose that too. I'm using this particular virtual device to make all of the text very readable on the screen. You might also see a dialog that pops up, asking you whether you want to use Logcat to log information from the emulator.

I recommend saying yes. This will cause the emulator to take quite a while to start up the first time, but once it's open, you can keep the emulator open throughout all of your development work and not have to hit this pause every time you want to test an application. Once the emulator comes to life, you should see this Welcome screen. You can click OK and that will take you to the emulator's home screen. From this screen, you can do any setup you'd like. For example, the emulator goes to sleep by default after a very short amount of inactive time.

To change that, I'll go to my apps list and then I'll type settings. That should take me to a search screen and I can choose the Settings application. I'll click on Display and then on Sleep, which defaults to sleeping after one minute of inactivity. I'll change that to 30 minutes. Then I'll click the Home button and that takes me back to the Home screen. So now my virtual device is set up and ready to use, and I'm ready to create my first application.

There are currently no FAQs about Android SDK: Local Data Storage.

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

join now Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Android SDK: Local Data Storage.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

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.

Sign up and receive emails about lynda.com and our online training library:

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

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.