Android 在api 11之前使用AbstractThreadedSyncAdapter

Android 在api 11之前使用AbstractThreadedSyncAdapter,android,adapter,android-adapter,android-syncadapter,Android,Adapter,Android Adapter,Android Syncadapter,如何为低于API-11的minSDK使用AbstractThreadedSyncAdapter?以下构造函数抱怨需要API-11 public DogSyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) { super(context, autoInitialize, allowParallelSyncs); } 正如文件中所述: Api第5级: public Abstrac

如何为低于API-11的minSDK使用AbstractThreadedSyncAdapter?以下构造函数抱怨需要API-11

public DogSyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) {
    super(context, autoInitialize, allowParallelSyncs);
  }

正如文件中所述:

Api第5级:

public AbstractThreadedSyncAdapter (Context context, boolean autoInitialize)
Api 11级:

public AbstractThreadedSyncAdapter (Context context, boolean autoInitialize, boolean allowParallelSyncs)
因此,您只需实现两个构造函数,然后调用其中一个:

if (sSyncAdapter == null) {
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
                    sSyncAdapter = new NotificationsSyncAdapter(getApplicationContext(), true, true);
                } else {
                    sSyncAdapter = new NotificationsSyncAdapter(getApplicationContext(), true);
                }
            }

因此,在API小于11的情况下,并行同步是不方便的?这基本上就是我问题的要点。抱歉,不清楚。不,在11以下您不能进行并行同步。那太糟糕了。我希望我可以使用
android.support.v4.content。AbstractThreadedSyncAdapter
。那真是一件令人沮丧的事。