Code example for ContentProviderClient

Methods: query

         * @throws RemoteException if there is a failure communicating with the remote 
         * {@link android.content.ContentProvider} 
        public static byte[] get(ContentProviderClient provider, Uri uri,
                Account account) throws RemoteException {
            Cursor c = provider.query(uri, DATA_PROJECTION, SELECT_BY_ACCOUNT,
                    new String[]{, account.type}, null);
            try { 
                if (c.moveToNext()) {
                    return c.getBlob(c.getColumnIndexOrThrow(Columns.DATA));
            } finally { 
            return null; 
         * Assigns the data array as the sync state for the given account. 
         * @param provider the {@link ContentProviderClient} that is to be used to communicate