Code example for ContentProviderClient

Methods: getLocalContentProvider

0
        mNetworkClient = ((LocastApplicationCallbacks) getApplication())
                .getNetworkClientForAccount(this, null);
 
        mContentProviderClient = getContentResolver().acquireContentProviderClient(mAuthority);
 
        mProvider = (SyncableProvider) mContentProviderClient.getLocalContentProvider();
 
        mSyncEngine = new SyncEngine(this, mNetworkClient, mProvider);
        mSyncProcessor = new SyncQueueProcessor();
        mSyncThread = new Thread(mSyncProcessor);
        mSyncThread.start();
    } 
 
    @Override 
    public int onStartCommand(Intent intent, int flags, int startId) {
        final Uri uri = intent.getData();
 
        final Bundle extras = intent.getExtras();
 
        enqueueItem(uri, extras);