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 18 19 20<manifest xmlns:android="http://schemas.android.com/apk/res/android" 21 package="com.example.android.basicsyncadapter" 22 android:versionCode="1" 23 android:versionName="1.0"> 24 25 <!-- SyncAdapters are available in API 5 and above. We use API 7 as a baseline for samples. --> 26 <!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle --> 27 28 <!-- Required for fetching feed data. --> 29 <uses-permission android:name="android.permission.INTERNET"/> 30 <!-- Required to register a SyncStatusObserver to display a "syncing..." progress indicator. --> 31 <uses-permission android:name="android.permission.READ_SYNC_STATS"/> 32 <!-- Required to enable our SyncAdapter after it's created. --> 33 <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/> 34 <!-- Required because we're manually creating a new account. --> 35 <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/> 36 37 38 <application 39 android:allowBackup="true" 40 android:icon="@drawable/ic_launcher" 41 android:label="@string/app_name" 42 android:theme="@style/AppTheme" > 43 44 <!-- Main activity, responsible for showing a list of feed entries. --> 45 <activity 46 android:name=".EntryListActivity" 47 android:label="@string/app_name" > 48 <!-- This intent filter places this activity in the system's app launcher. --> 49 <intent-filter> 50 <action android:name="android.intent.action.MAIN" /> 51 <category android:name="android.intent.category.LAUNCHER" /> 52 </intent-filter> 53 </activity> 54 55 <!-- ContentProvider to store feed data. 56 57 The "authorities" here are defined as part of a ContentProvider interface. It's used here 58 as an attachment point for the SyncAdapter. See res/xml/syncadapter.xml and 59 SyncService.java. 60 61 Since this ContentProvider is not exported, it will not be accessible outside of this app's 62 package. --> 63 <provider 64 android:name=".provider.FeedProvider" 65 android:authorities="com.example.android.basicsyncadapter" 66 android:exported="false" /> 67 68 <!-- This service implements our SyncAdapter. It needs to be exported, so that the system 69 sync framework can access it. --> 70 <service android:name=".SyncService" 71 android:exported="true"> 72 <!-- This intent filter is required. It allows the system to launch our sync service 73 as needed. --> 74 <intent-filter> 75 <action android:name="android.content.SyncAdapter" /> 76 </intent-filter> 77 <!-- This points to a required XML file which describes our SyncAdapter. --> 78 <meta-data android:name="android.content.SyncAdapter" 79 android:resource="@xml/syncadapter" /> 80 </service> 81 82 <!-- This implements the account we'll use as an attachment point for our SyncAdapter. Since 83 our SyncAdapter doesn't need to authenticate the current user (it just fetches a public RSS 84 feed), this account's implementation is largely empty. 85 86 It's also possible to attach a SyncAdapter to an existing account provided by another 87 package. In that case, this element could be omitted here. --> 88 <service android:name="com.example.android.common.accounts.GenericAccountService"> 89 <!-- Required filter used by the system to launch our account service. --> 90 <intent-filter> 91 <action android:name="android.accounts.AccountAuthenticator" /> 92 </intent-filter> 93 <!-- This points to an XMLf ile which describes our account service. --> 94 <meta-data android:name="android.accounts.AccountAuthenticator" 95 android:resource="@xml/authenticator" /> 96 </service> 97 98 </application> 99 100</manifest> 101