"Android" 19.3 ContentProvider and Android further packaged related classes

Source: Internet
Author: User
<span id="Label3"></p><p><p>Category: C #, Android, VS2015;</p></p><p><p>Date created: 2016-03-08 I. INTRODUCTION</p></p><p><p>Contentprovider: content Provider.</p></p><p><p>Android's ContentProvider is very similar to The. net Framework's EF (Entity framework). In ef, each class represents a table in the database, and each property in the class corresponds to a Table's field, and each instance of the class represents a row of records for the database Table. similarly, in android, Each instance of the ContentProvider class represents a row of records for a data table, and each item in the ContentProvider instance collection represents a column in the data table.</p></p><p><p>In addition, the data source for the Entity framework is not necessarily a database, or it can be other types of Data. similarly, Android's ContentProvider can access data sources that are not necessarily databases, and can be other types of Data. and EF and ContentProvider also provide crud (Create, Read, Update, Delete) operations on the data source.</p></p><p><p>ContentProvider can be understood as a tool for data interaction or data sharing between different processes. In other words, using contentproviders, you can access data exposed by other applications, such as access to Android system data (such as contacts, media, and calendar information), sqlite databases, files, and so On.</p></p><p><p>1. Android built-in content provider (built-in Providers)</p></p><p><p>All provide built into Android are under the Android.provider namespace, and these classes are:</p></p> <ul> <ul> <li>Android.Provider.Browser class – Browse the history of your bookmarks (this requires Read_history_bookmarks or Write_history_bookmarks permissions).</li> <li>Android.Provider.CallLog Class – Call History. View recently dialed or received Calls.</li> <li>Android.Provider.ContactsContract Class – Contact Person. View a User's contact list, including information such as name, phone number, photo, and so On.</li> <li>Android.Provider.MediaStore class – Media storage. View media files that are stored on your device, including audio, images, videos, and More.</li> <li>Android.Provider.Settings class – System settings and Preferences.</li> <li>Android.Provider.UserDictionary class – A user-defined dictionary for predicting text Input.</li> <li>Android.Provider.VoicemailContract class – Contacts in voicemail and their history.</li> </ul> </ul> <p><p>All the provide that are built into Android are actually operated by contentprovider, except that you can't see the contentprovider after it's encapsulated, in other words, you just use it to contentprovider further encapsulation of these classes on the line, This is more convenient to Use.</p></p><p><p>2. How to use these built-in providers</p></p><p><p>The preferred way to use ContentProvider is to use the Cursorloader class in Loadermanager to get an instance of Contentprovider. , this approach actually loads the data by first shutting down the main thread and then using data binding. Once you get an instance of contentproviders, you can display the data that is loaded by the Cursoradapters Contentproviders.</p></p><p><p>As I said earlier, because Android has a further encapsulation of contentprovider, when accessing the data exposed by the Android system through ContentProvider in code, it actually uses the ContentProvider class to handle it, It's just that you don't see it doing it. In other words, for the developer, it encapsulates it, requiring you to create a cursor from the URI before using the cursor object to access the data it Exposes.</p></p><p><p>The following is an example of the Android.provider.ContactsContract class that explains the meaning and usage of uris, and the use of other classes in built-in providers is similar.</p></p><p><p>A URI is actually a string that is written upside down by dns, for Example:</p></p><p><p>Com.android.contacts/data</p></p><p><p>In order not to allow developers to expend effort to understand and remember this raw string, The contacts (contact) provider for Android exposes these metadata in a constant form in the Android.provider.ContactsContract class, and you only need to pass these constants to get the ContentProvider URI , the table name that can be queried, and the name of the Column.</p></p><p><p>There are 3 ways to create a cursor through a uri:</p></p> <ul> <ul> <li>Cursorloader (). Loadinbackground () – This is the preferred approach and is the approach introduced from Android 3.0 (API level 11). Because Cursorloader is queried contentresolver by a background thread, This method does not cause the interface to block, and it can be automatically closed when not in Use. also, If you want to use this class in a version lower than Android 3.0, you can access it through the V4 compatibility library (V4 compatibility library).</li> <li>Contentresolver.query () – After using this method to get the cursor object, you must call the cursor when not in Use. Close () closes it, or it causes a memory Leak.</li> <li>Managedquery () – This is the method provided in Android 2.3 (API level 10) and earlier Versions. Note that this method is already marked as obsolete in Android 3.0 (API level 11), so do not use it again.</li> </ul> </ul> <p><p>In any of these methods exposed by android, you need to provide the following basic parameters, regardless of the method you use:</p></p> <ul> <ul> <li>The fully qualified name of the uri– Content.</li> <li>projection– Projection. The function is to specify one or more columns selected for the Cursor.</li> <li>selection– its role is similar to the WHERE clause of sql.</li> <li>selectionargs– replaces the selected content in the WHERE clause with a parameter.</li> <li>sortorder– Specifies the sorted column.</li> </ul> </ul> <p><p>again, Cursorloader is the preferred way to use Contentprovider.</p></p><p><p>3. Custom ContentProvider</p></p><p><p>In addition to the Android built-in provider described above, you can create a custom provider. The usage is already covered in the database chapter and is not repeated here. Ii. example 19-3-reading and updating contacts with Cursorloader</p></p><p><p>This section still demonstrates the basic usage of cursorloader by reading and updating the Address Book as an Example. This example is based on the example of "12.5 using intent to read and update contacts," which, in this case, displays the corresponding photo, in addition to the contact, as shown in example 12-4, if you enter a photo of the contact in the address Book. If you don't enter a photo in your address book, use the default photo instead.</p></p><p><p>1. operation</p></p><p><p>Because this is an example, the Address book photo in is a randomly selected figure.</p></p><p><p></p></p> <p><p>2. Design Steps</p></p><p><p>(1) the required permissions for this example</p></p><p><p>Because the previous chapters have already added these permissions, they do not need to be added. If you create a project individually, you must add the following Permissions.</p></p><p><p><uses-permission android:name= "android.permission.WRITE_PROFILE"/></p></p><p><p><uses-permission android:name= "android.permission.READ_PROFILE"/></p></p><p><p><uses-permission android:name= "android.permission.READ_CONTACTS"/></p></p><p><p><uses-permission android:name= "android.permission.WRITE_CONTACTS"/></p></p><p><p>(2) Add Ch1903_contact_picture.png</p></p><p><p>Add the file under the drawable folder. Used to replace photos that are displayed when a contact photo is not found.</p></p><p><p>(3) Add Ch1903contactlistitem.xml</p></p><p><p>Add the file under the layout folder.</p></p><pre><span style="color: #0000ff"><span style="color: #0000ff"><?</span></span><span style="color: #ff00ff"><span style="color: #ff00ff">XML version= "1.0" encoding= "utf-8"</span></span><span style="color: #0000ff"><span style="color: #0000ff">?></span></span><span style="color: #0000ff"><span style="color: #0000ff"><</span></span><span style="color: #800000"><span style="color: #800000">LinearLayout</span></span><span style="color: #ff0000"><span style="color: #ff0000">xmlns:android</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "http://schemas.android.com/apk/res/android"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_width</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "fill_parent"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_height</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "fill_parent"</span></span><span style="color: #0000ff"><span style="color: #0000ff">></span></span> <span style="color: #0000ff"><span style="color: #0000ff"><</span></span><span style="color: #800000"><span style="color: #800000">ImageView</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:id</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "@+id/ch1903_contactimage"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_width</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "50dp"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_height</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "50dp"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_margin</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "5dp"</span></span> <span style="color: #0000ff"><span style="color: #0000ff">/></span></span> <span style="color: #0000ff"><span style="color: #0000ff"><</span></span><span style="color: #800000"><span style="color: #800000">TextView</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:id</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "@+id/ch1903_contactname"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_width</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "wrap_content"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_height</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "wrap_content"</span></span><span style="color: #ff0000"><span style="color: #ff0000">android:textappearance</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "? android:attr/textappearancelarge"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_marginleft</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "5dp"</span></span> <span style="color: #0000ff"><span style="color: #0000ff">/></span></span><span style="color: #0000ff"><span style="color: #0000ff"></</span></span><span style="color: #800000"><span style="color: #800000">LinearLayout</span></span><span style="color: #0000ff"><span style="color: #0000ff">></span></span></pre><p><p>(4) Add Ch1903main.axml</p></p><p><p>Add the file under the layout folder.</p></p><pre><span style="color: #0000ff"><span style="color: #0000ff"><?</span></span><span style="color: #ff00ff"><span style="color: #ff00ff">XML version= "1.0" encoding= "utf-8"</span></span><span style="color: #0000ff"><span style="color: #0000ff">?></span></span><span style="color: #0000ff"><span style="color: #0000ff"><</span></span><span style="color: #800000"><span style="color: #800000">LinearLayout</span></span><span style="color: #ff0000"><span style="color: #ff0000">xmlns:android</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "http://schemas.android.com/apk/res/android"</span></span><span style="color: #ff0000"><span style="color: #ff0000">android:orientation</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "vertical"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_width</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "fill_parent"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_height</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "fill_parent"</span></span><span style="color: #0000ff"><span style="color: #0000ff">></span></span> <span style="color: #0000ff"><span style="color: #0000ff"><</span></span><span style="color: #800000"><span style="color: #800000">ListView</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:id</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "@+id/ch1903_contactslistview"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_width</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "fill_parent"</span></span><span style="color: #ff0000"><span style="color: #ff0000">Android:layout_height</span></span><span style="color: #0000ff"><span style="color: #0000ff">= "fill_parent"</span></span> <span style="color: #0000ff"><span style="color: #0000ff">/></span></span><span style="color: #0000ff"><span style="color: #0000ff"></</span></span><span style="color: #800000"><span style="color: #800000">LinearLayout</span></span><span style="color: #0000ff"><span style="color: #0000ff">></span></span></pre><p><p>(5) Add Ch1903MainActivity.cs</p></p><p><p>Add the file under the Srcdemos folder.</p></p><pre><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">System;</span></span><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">System.Collections.Generic;</span></span><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">system.linq;</span></span><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">system.text;</span></span><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">android.app;</span></span><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">android.content;</span></span><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">android.os;</span></span><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">android.runtime;</span></span><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">android.views;</span></span><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">android.widget;</span></span><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">android.provider;</span></span><span style="color: #0000ff"><span style="color: #0000ff">using</span></span><span style="color: #000000"><span style="color: #000000">android.database;</span></span><span style="color: #0000ff"><span style="color: #0000ff">namespace</span></span><span style="color: #000000"><span style="color: #000000">Mydemos.srcdemos{[intentfilter (</span></span><span style="color: #0000ff"><span style="color: #0000ff">New</span></span>[] {intent.actionmain}, Categories =<span style="color: #0000ff"><span style="color: #0000ff">New</span></span><span style="color: #000000"><span style="color: #000000">[] {ch. mydemoscategory})] [Activity (Label</span></span>=<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">basic usage of "example 19-3" contentprovider</span></span><span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #000000"><span style="color: #000000">)] </span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> public</span> <span style="color: #0000ff"><span style="color: #0000ff">class</span></span><span style="color: #000000"><span style="color: #000000">ch1903mainactivity:activity {</span></span><span style="color: #0000ff"><span style="color: #0000ff">protected</span></span> <span style="color: #0000ff"><span style="color: #0000ff">Override</span></span> <span style="color: #0000ff"><span style="color: #0000ff">void</span></span><span style="color: #000000"><span style="color: #000000">OnCreate (Bundle Savedinstancestate) {</span></span><span style="color: #0000ff"><span style="color: #0000ff">Base</span></span><span style="color: #000000"><span style="color: #000000">. OnCreate (savedinstancestate); Setcontentview (Resource.Layout.ch1903Main); </span></span><span style="color: #0000ff"><span style="color: #0000ff">var</span></span>Contactsadapter =<span style="color: #0000ff"><span style="color: #0000ff">New</span></span>Contactsadapter (<span style="color: #0000ff"><span style="color: #0000ff"></span> this</span><span style="color: #000000"><span style="color: #000000">); </span></span><span style="color: #0000ff"><span style="color: #0000ff">var</span></span>Contactslistview = findviewbyid<listview><span style="color: #000000"><span style="color: #000000">(Resource.Id.ch1903_ContactsListView); Contactslistview.adapter</span></span>=<span style="color: #000000"><span style="color: #000000">contactsadapter; } } </span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> public</span> <span style="color: #0000ff"><span style="color: #0000ff">class</span></span>Contactsadapter:baseadapter<ch1903contact><span style="color: #000000"><span style="color: #000000">{List</span></span><ch1903Contact><span style="color: #000000"><span style="color: #000000">contactlist; Activity activity; </span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> public</span> <span style="color: #0000ff"><span style="color: #0000ff">Override</span></span> <span style="color: #0000ff"><span style="color: #0000ff">int</span></span><span style="color: #000000"><span style="color: #000000">Count {</span></span><span style="color: #0000ff"><span style="color: #0000ff">Get</span></span>{<span style="color: #0000ff"><span style="color: #0000ff">return</span></span><span style="color: #000000"><span style="color: #000000">contactlist.count;} } </span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> public</span> <span style="color: #0000ff"><span style="color: #0000ff">Override</span></span>Ch1903contact<span style="color: #0000ff"><span style="color: #0000ff"></span> this</span>[<span style="color: #0000ff"><span style="color: #0000ff">int</span></span><span style="color: #000000"><span style="color: #000000">position] { </span></span><span style="color: #0000ff"><span style="color: #0000ff">Get</span></span>{<span style="color: #0000ff"><span style="color: #0000ff">return</span></span><span style="color: #000000"><span style="color: #000000">contactlist[position];} } </span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> public</span><span style="color: #000000"><span style="color: #000000">contactsadapter (activity Activity) {</span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> this</span>. Activity =<span style="color: #000000"><span style="color: #000000">activity; Fillcontacts (); } </span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> public</span> <span style="color: #0000ff"><span style="color: #0000ff">Override</span></span> <span style="color: #0000ff"><span style="color: #0000ff">Long</span></span>Getitemid (<span style="color: #0000ff"><span style="color: #0000ff">int</span></span><span style="color: #000000"><span style="color: #000000">Position) { </span></span><span style="color: #0000ff"><span style="color: #0000ff">return</span></span><span style="color: #000000"><span style="color: #000000">contactlist[position]. Id; } </span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> public</span> <span style="color: #0000ff"><span style="color: #0000ff">Override</span></span>View GetView (<span style="color: #0000ff"><span style="color: #0000ff">int</span></span><span style="color: #000000"><span style="color: #000000">position, View convertview, viewgroup Parent) { </span></span><span style="color: #0000ff"><span style="color: #0000ff">var</span></span>View = convertview?? Activity. Layoutinflater.inflate (Resource.Layout.ch1903ContactListItem, parent,<span style="color: #0000ff"><span style="color: #0000ff">false</span></span><span style="color: #000000"><span style="color: #000000">); </span></span><span style="color: #0000ff"><span style="color: #0000ff">var</span></span>ContactName = View. Findviewbyid<textview><span style="color: #000000"><span style="color: #000000">(Resource.Id.ch1903_ContactName); </span></span><span style="color: #0000ff"><span style="color: #0000ff">var</span></span>Contactimage = View. Findviewbyid<imageview><span style="color: #000000"><span style="color: #000000">(Resource.Id.ch1903_ContactImage); Contactname.text</span></span>=<span style="color: #000000"><span style="color: #000000">contactlist[position]. DisplayName; </span></span><span style="color: #0000ff"><span style="color: #0000ff">if</span></span>(contactlist[position]. PhotoID = =<span style="color: #0000ff"><span style="color: #0000ff">NULL</span></span><span style="color: #000000"><span style="color: #000000">) {contactimage</span></span>= View. Findviewbyid<imageview><span style="color: #000000"><span style="color: #000000">(Resource.Id.ch1903_ContactImage); Contactimage.setimageresource (Resource.Drawable.ch1903_contact_picture); } </span></span><span style="color: #0000ff"><span style="color: #0000ff">Else</span></span><span style="color: #000000"><span style="color: #000000"> { </span></span><span style="color: #0000ff"><span style="color: #0000ff">var</span></span>Contacturi =<span style="color: #000000"><span style="color: #000000">Contenturis.withappendedid (ContactsContract.Contacts.ContentUri, contactlist[position]. Id); </span></span><span style="color: #0000ff"><span style="color: #0000ff">var</span></span>Contactphotouri =<span style="color: #000000"><span style="color: #000000">Android.Net.Uri.WithAppendedPath (contacturi, ContactsContract.Contacts.Photo.ContentDirectory); Contactimage.setimageuri (contactphotouri); } </span></span><span style="color: #0000ff"><span style="color: #0000ff">return</span></span><span style="color: #000000"><span style="color: #000000">view; } </span></span><span style="color: #0000ff"><span style="color: #0000ff">Private</span></span> <span style="color: #0000ff"><span style="color: #0000ff">void</span></span><span style="color: #000000"><span style="color: #000000">fillcontacts () {</span></span><span style="color: #0000ff"><span style="color: #0000ff">var</span></span>URI =<span style="color: #000000"><span style="color: #000000">ContactsContract.Contacts.ContentUri; </span></span><span style="color: #0000ff"><span style="color: #0000ff">string</span></span>[] projection =<span style="color: #000000"><span style="color: #000000">{ContactsContract.Contacts.InterfaceConsts.Id, ContactsContract.Contacts.Inter faceconsts.displayname, ContactsContract.Contacts.InterfaceConsts.PhotoId}; </span></span><span style="color: #008000"><span style="color: #008000">//</span></span><span style="color: #008000"><span style="color: #008000">The following statement is obsolete, do not use it</span></span><span style="color: #008000"><span style="color: #008000">//</span></span><span style="color: #008000"><span style="color: #008000">var cursor = Activity. Managedquery (uri, projection, null, null, null); </span></span><span style="color: #008000"><span style="color: #008000">//</span></span><span style="color: #008000"><span style="color: #008000">If you use this statement, you must call the cursor when you are not using it. Close () Closes it</span></span><span style="color: #008000"><span style="color: #008000">//</span></span><span style="color: #008000"><span style="color: #008000">var cursor = Activity. Contentresolver.query (uri, projection, null, null, null); </span></span><span style="color: #008000"><span style="color: #008000">//</span></span><span style="color: #008000"><span style="color: #008000">here is the recommended usage</span></span> <span style="color: #0000ff"><span style="color: #0000ff">var</span></span>Loader =<span style="color: #0000ff"><span style="color: #0000ff">New</span></span>Cursorloader (activity, uri, projection,<span style="color: #0000ff"><span style="color: #0000ff">NULL</span></span>,<span style="color: #0000ff"><span style="color: #0000ff">NULL</span></span>,<span style="color: #0000ff"><span style="color: #0000ff">NULL</span></span><span style="color: #000000"><span style="color: #000000">); </span></span><span style="color: #0000ff"><span style="color: #0000ff">var</span></span>cursor =<span style="color: #000000"><span style="color: #000000">(icursor) Loader. Loadinbackground (); ContactList</span></span>=<span style="color: #0000ff"><span style="color: #0000ff">New</span></span>List<ch1903contact><span style="color: #000000"><span style="color: #000000">(); </span></span><span style="color: #0000ff"><span style="color: #0000ff">if</span></span><span style="color: #000000"><span style="color: #000000">(cursor.) Movetofirst ()) {</span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> do</span><span style="color: #000000"><span style="color: #000000">{contactlist.add (</span></span><span style="color: #0000ff"><span style="color: #0000ff">New</span></span><span style="color: #000000"><span style="color: #000000">ch1903contact {Id</span></span>= Cursor. Getlong (cursor. Getcolumnindex (projection[<span style="color: #800080"><span style="color: #800080">0</span></span><span style="color: #000000"><span style="color: #000000">]), DisplayName</span></span>= Cursor. GetString (cursor. Getcolumnindex (projection[<span style="color: #800080"><span style="color: #800080">1</span></span><span style="color: #000000"><span style="color: #000000">]), photoid</span></span>= Cursor. GetString (cursor. Getcolumnindex (projection[<span style="color: #800080"><span style="color: #800080">2</span></span><span style="color: #000000"><span style="color: #000000">])) }); } </span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> while</span><span style="color: #000000"><span style="color: #000000">(cursor.) MoveToNext ()); } } } </span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> public</span> <span style="color: #0000ff"><span style="color: #0000ff">class</span></span><span style="color: #000000"><span style="color: #000000">Ch1903contact {</span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> public</span> <span style="color: #0000ff"><span style="color: #0000ff">Long</span></span>Id {<span style="color: #0000ff"><span style="color: #0000ff">Get</span></span>;<span style="color: #0000ff"><span style="color: #0000ff">Set</span></span><span style="color: #000000"><span style="color: #000000">; } </span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> public</span> <span style="color: #0000ff"><span style="color: #0000ff">string</span></span>DisplayName {<span style="color: #0000ff"><span style="color: #0000ff">Get</span></span>;<span style="color: #0000ff"><span style="color: #0000ff">Set</span></span><span style="color: #000000"><span style="color: #000000">; } </span></span><span style="color: #0000ff"><span style="color: #0000ff"></span> public</span> <span style="color: #0000ff"><span style="color: #0000ff">string</span></span>photoid {<span style="color: #0000ff"><span style="color: #0000ff">Get</span></span>;<span style="color: #0000ff"><span style="color: #0000ff">Set</span></span><span style="color: #000000"><span style="color: #000000">; } }}</span></span></pre><p><p>"Android" 19.3 ContentProvider and Android further packaged related classes</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.