title: How to notify calling Activity when SyncAdapter has finished?
body: <p>In my Android project I use a custom <code>SyncAdapter</code> which downloads data and stores it in local SQLite database.</p>
  
  <pre><code>public class CustomSyncAdapter extends AbstractThreadedSyncAdapter {
  
      public CustomSyncAdapter(Context context, boolean autoInitialize) {
          super(context, autoInitialize);
      }
  
      @Override
      public void onPerformSync(Account account,
                                Bundle extras,
                                String authority,
                                ContentProviderClient provider,
                                SyncResult syncResult) {
  
          // 1) Download data via AsyncTask
          // 2) Store data via ContentProvider
      }
  }
  </code></pre>
  
  <p>I schedule sychronization from the main <code>Activity</code> using the <code>ContentResolver</code> such as ...</p>
  
  <pre><code>ContentResolver.requestSync(account, Authentication.AUTHORITY, bundle);
  </code></pre>
  
  <p>Is there a common way the calling <code>Activity</code> is notified when the synchronization has finished?</p>