Skip to content

Instantly share code, notes, and snippets.

@udacityandroid
Last active August 29, 2015 14:05
Show Gist options
  • Save udacityandroid/335d2fcf012d8e59c6fd to your computer and use it in GitHub Desktop.
Save udacityandroid/335d2fcf012d8e59c6fd to your computer and use it in GitHub Desktop.
Adding everything to the AndroidManifest for the SyncAdapter
<!-- SyncAdapter's dummy authentication service -->
<service
android:name=".sync.SunshineAuthenticatorService"
>
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator" />
</intent-filter>
<meta-data
android:name="android.accounts.AccountAuthenticator"
android:resource="@xml/authenticator" />
</service>
<provider
android:authorities="@string/content_authority"
android:name=".data.WeatherProvider"
android:exported="false"
android:syncable="true" />
<!-- Permissions required by the sync adapter -->
<uses-permission
android:name="android.permission.READ_SYNC_SETTINGS"/>
<uses-permission
android:name="android.permission.WRITE_SYNC_SETTINGS"/>
<uses-permission
android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
<!-- The SyncAdapter service -->
<service
android:name=".sync.SunshineSyncService"
android:exported="true"
>
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter" />
</service>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment