Use a SyncProvider to sync all Campaigns

The SyncService constantly deletes and re-creates the campaigns
in the background to make sure they are up to date

FIXME: Handle deleted or renamed campaigns

Change-Id: I5d03995ada219481ea38887a8ea6d59fa11d2ac8
This commit is contained in:
YuviPanda 2013-09-06 05:54:13 +05:30
parent a56fa072a1
commit 2503f54731
13 changed files with 551 additions and 136 deletions

View file

@ -5,9 +5,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/campaignsListFragment"
class="org.wikimedia.commons.campaigns.CampaignsListFragment"
<ListView
android:id="@+id/campaignsList"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>

View file

@ -102,4 +102,5 @@
<string name="welcome_copyright_subtext">Avoid copyrighted materials you found from the Internet as well as images of posters, book covers, etc.</string>
<string name="welcome_final_text">You think you got it?</string>
<string name="welcome_final_button_text">Yes!</string>
<string name="provider_campaigns">Campaigns</string>
</resources>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:contentAuthority="org.wikimedia.commons.campaigns.contentprovider"
android:accountType="org.wikimedia.commons"
android:supportsUploading="false"
android:userVisible="true"
android:isAlwaysSyncable="true"
/>