A (175)

(Tuis.) #1
CHAPTER 14: Android Content Providers: Providing Data to Applications 543

Mouse over the wavy red error highlighting and select the Import ‘ContentValues’ (android.content)
option. Call the .put( ) method off the viceroyContact ContentValues object to put a value in the
RawContacts database. See Figure 14-36.


Figure 14-36. Call a .put( ) method off of the viceroyContact ContentValues object and load the RawContacts DB


Add a String object named electedViceroy to the addGalaxyViceroy( ) parameter list, and then
reference this electedViceroy String object in the .put( ) method call to put the Viceroy’s name into
the RawContacts database. See Figure 14-37.


Figure 14-37. Add a String object named electedViceroy to the method call parameter list and .put( ) method data value

Free download pdf