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>BasicSyncAdapter</name>
19    <group>Connectivity</group>
20    <package>com.example.android.basicsyncadapter</package>
21
22
23    <!-- change minSdk if needed-->
24    <minSdk>14</minSdk>
25
26    <strings>
27        <intro>
28            <![CDATA[
29            This sample demonstrates using SyncAdapter to fetch background data for an app that
30            doesn\'t require a user-visible account type or 2-way synchronization.
31
32            \n\nThis sample periodically downloads the feed from the Android Developer Blog and
33            caches the data in a content provider. At runtime, the cached feed data is displayed
34            inside a ListView.
35            ]]>
36        </intro>
37    </strings>
38    <metadata>
39        <status>PUBLISHED</status>
40        <categories>Background, Connectivity</categories>
41        <technologies>Android</technologies>
42        <languages>Java</languages>
43        <solutions>Mobile</solutions>
44        <level>INTERMEDIATE</level>
45        <icon>screenshots/icon-web.png</icon>
46        <screenshots>
47            <img>screenshots/main.png</img>
48        </screenshots>
49        <api_refs>
50            <android>android.app.Service</android>
51            <android>android.content.AbstractThreadedSyncAdapter</android>
52            <android>android.content.ContentProvider</android>
53            <android>android.content.ContentResolver</android>
54            <android>android.content.SyncResult</android>
55            <android>android.database.sqlite.SQLiteDatabase</android>
56        </api_refs>
57        <description>
58<![CDATA[
59This sample demonstrates using SyncAdapter to fetch background
60data for an app. It covers the creation of the required Service
61that the OS uses to initiate the background data sync as well as
62scheduling syncs with background data.
63]]>
64        </description>
65        <intro>
66<![CDATA[
67This sample demonstrates using SyncAdapter to fetch background data
68for an app. SyncAdapters can be used to execute your data transfer
69code at configurable intervals, while efficiently using battery and
70other system resources.
71
72This sample implements all the required elements of a sync adapter.
73- Creates a sync adapter class.
74- Creates a bound Service which the OS uses to initiate a sync.
75- Defines the sync adapter properties in an XML resource file.
76- Declares the bound Service in the app manifest.
77
78For more on SyncAdapters refer to [Transferring Data Using Sync Adapters][1]
79
80[1]: http://developer.android.com/training/sync-adapters/index.html
81]]>
82        </intro>
83    </metadata>
84
85    <template src="base"/>
86    <common src="accounts"/>
87    <common src="db"/>
88    <common src="logger"/>
89</sample>
90