Home | History | Annotate | Download | only in BasicContactables
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3  Copyright 2013 The Android Open Source Project
      4 
      5  Licensed under the Apache License, Version 2.0 (the "License");
      6  you may not use this file except in compliance with the License.
      7  You may obtain a copy of the License at
      8 
      9      http://www.apache.org/licenses/LICENSE-2.0
     10 
     11  Unless required by applicable law or agreed to in writing, software
     12  distributed under the License is distributed on an "AS IS" BASIS,
     13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  See the License for the specific language governing permissions and
     15  limitations under the License.
     16 -->
     17 <sample>
     18     <name>BasicContactables</name>
     19     <group>Content</group>
     20     <package>com.example.android.basiccontactables</package>
     21 
     22     <!-- change minSdk if needed-->
     23     <minSdk>18</minSdk>
     24     <targetSdkVersion>22</targetSdkVersion>
     25 
     26     <strings>
     27         <intro>
     28             <![CDATA[
     29             This sample demonstrates how to use the Contactables table to search for contacts.
     30             \n\nQuery strings sent to the Contactables table will match both contact names and phone numbers,
     31             reducing the number of queries your application needs to use when searching the contacts database!
     32             ]]>
     33         </intro>
     34     </strings>
     35 
     36     <template src="base"/>
     37     <common src="logger"/>
     38 
     39     <metadata>
     40         <status>PUBLISHED</status>
     41         <categories>Content</categories>
     42         <technologies>Android</technologies>
     43         <languages>Java</languages>
     44         <solutions>Mobile</solutions>
     45         <level>INTERMEDIATE</level>
     46         <icon>screenshots/icon-web.png</icon>
     47         <screenshots>
     48             <img>screenshots/1-main.png</img>
     49             <img>screenshots/2-search.png</img>
     50             <img>screenshots/3-results.png</img>
     51         </screenshots>
     52         <api_refs>
     53             <android>android.app.SearchManager</android>
     54             <android>android.widget.SearchView</android>
     55             <android>android.app.LoaderManager</android>
     56             <android>android.content.CursorLoader</android>
     57             <android>android.provider.ContactsContract.CommonDataKinds</android>
     58         </api_refs>
     59 
     60         <description>
     61 <![CDATA[
     62 This sample shows how to search for contacts, displaying a SearchView in the Action Bar for user input and implementing a query Cursor with CommonDataKinds.Contactables.
     63 ]]>
     64         </description>
     65 
     66         <intro>
     67 <![CDATA[
     68 This sample displays a [SearchView][1] in the Action Bar when the search icon is clicked. It then implements the [LoaderManager.LoaderCallbacks][2] interface to query the contacts table, using a [CursorLoader][3].
     69 
     70 For details on how to implement the [SearchView][1], refer to the training guide [Setting up the search interface][4].
     71 
     72 For details on how to implement the [LoaderManager.LoaderCallbacks][2] interface, refer to the [Using the LoaderManager Callbacks][5] guide.
     73 
     74 For details on how to query the contacts provider, refer to the [Contacts Provider Access][6] guide.
     75 
     76 [1]: http://developer.android.com/reference/android/widget/SearchView.html
     77 [2]: http://developer.android.com/reference/android/app/LoaderManager.LoaderCallbacks.html
     78 [3]: http://developer.android.com/reference/android/content/CursorLoader.html
     79 [4]: http://developer.android.com/training/search/setup.html
     80 [5]: http://developer.android.com/guide/components/loaders.html#callback
     81 [6]: http://developer.android.com/guide/topics/providers/contacts-provider.html#Access
     82 ]]>
     83         </intro>
     84     </metadata>
     85 
     86 </sample>
     87