A (175)

(Tuis.) #1

524 CHAPTER 14: Android Content Providers: Providing Data to Applications


In case you are wondering how to get your Nexus One AVD emulator to show the standard launch
screen instead of auto-running the application, remember that you can use the Window ➤ Android
Virtual Device Manager menu sequence in Eclipse to launch your emulator without first referencing
your Android development project.


Click on the Create a new contact button, shown in the middle pane of Figure 14-11, to add a new
contact to the database table. When the “Your new contact won’t be backed up” message, which
can be seen in the right hand pane of Figure 14-11, appears, select the Keep local option, which will
write this database table to your workstation hard disk drive.


Notice that you can use an AVD to populate your smartphone contact database by using the other
Add on-line account option. I prefer to enter my contacts via my Galaxy Note 3 directly, so that I keep
my development activities and my business contacts separate, but it is possible to bridge the two!


Now you are ready to enter your first Galaxy Ruler, Emperor Spock from Vulcan, into the contact
database, as shown in the left pane of Figure 14-12. Use the virtual keyboard to type the name, and
then click on the Done button to enter it. As you can see in the center pane of the figure, it will be
entered into the E section of your ContactsContract database. At the bottom of that pane, you will
see a smiling contact icon with a plus + sign next to it; click it to add the second contact—Emperor
James Tiberius the Fifth of the Milky Way Galaxy.


Figure 14-11. Launch the Nexus One and then click on the Contacts icon (left) and choose Create a New Contact (middle)

Free download pdf