UriMatcher match - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for UriMatcher match method.

This code example shows how to use the following methods:match
 
    return(count);
  } 
 
  private boolean isCollectionUri(Uri url) {
    return(MATCHER.match(url) == CONSTANTS);
  } 
} 
9
CodeRank
This code example shows how to use the following methods:match
 
    return(count);
  } 
 
  private boolean isCollectionUri(Uri url) {
    return(MATCHER.match(url) == CONSTANTS);
  } 
} 
9
CodeRank
This code example shows how to use the following methods:match
 
    return(count);
  } 
 
  private boolean isCollectionUri(Uri url) {
    return(MATCHER.match(url) == CONSTANTS);
  } 
} 
9
CodeRank
This code example shows how to use the following methods:match
This code example shows how to use the following methods:match
 
    return(count);
  } 
 
  private boolean isCollectionUri(Uri url) {
    return(MATCHER.match(url) == CONSTANTS);
  } 
} 
9
CodeRank
This code example shows how to use the following methods:match
 
    return(count);
  } 
 
  private boolean isCollectionUri(Uri url) {
    return(MATCHER.match(url) == CONSTANTS);
  } 
} 
9
CodeRank
This code example shows how to use the following methods:match
 
    return(count);
  } 
 
  private boolean isCollectionUri(Uri url) {
    return(MATCHER.match(url) == CONSTANTS);
  } 
} 
9
CodeRank
This code example shows how to use the following methods:match, getEncodedPath, getLastPathSegment, getPathSegments, toString
    } 
 
    protected LazyDocumentsList resolveDocumentProvider(Uri uri) {
 
        DocumentProvider providerService = ((AndroidAutomationClient) getSession().getClient()).getDocumentProvider();
        List<String> segments = uri.getPathSegments();
        if (segments.size() < 1) {
            return null; 
        } 
        String providerName = segments.get(0);
        LazyDocumentsList docList = providerService.getReadOnlyDocumentsList(
                providerName, getSession());
        return docList;
    } 
 
    @Override 
    public Cursor query(Uri uri, String[] columns, String selection,
            String[] selectionArgs, String sortOrder) {
 
        // Log.i("NuxeoContentProvider", "called on query with uri : " + 

6
CodeRank
This code example shows how to use the following methods:match
	////////////////////////////////////////////////////////////////////////////////////// 
	// PRIVATE METHODS 
	////////////////////////////////////////////////////////////////////////////////////// 
 
	private Class<? extends Model> getModelType(Uri uri) {
		int code = URI_MATCHER.match(uri);
		if (code != UriMatcher.NO_MATCH) {
			return TYPE_CODES.get(code);
		} 
 
		return null; 
	} 
 
	private Uri createUri(Class<? extends Model> type, Long id) {
		return Uri.parse("content://" + mAuthority + "/" + Cache.getTableName(type).toLowerCase() + "/" + id);
	} 
 
	private void notifyChange(Uri uri) {
		getContext().getContentResolver().notifyChange(uri, null);
	} 
9
CodeRank
This code example shows how to use the following methods:match
 
    private String buildSelection(Uri uri, String selection) {
        long id = 0;
        String additionalSelection = null;
 
        switch (URI_MATCHER.match(uri)) {
        case TYPE_ITEM:
            id = ContentUris.parseId(uri);
            additionalSelection = BaseColumns._ID + " = " + id;
            break; 
        case TYPE_ITEMS:
            // do nothing 
            break; 
        default: 
            throw new IllegalArgumentException("unknown uri: " + uri);
        } 
 
        if (additionalSelection == null) {
            return selection;
        } 
9
CodeRank

Related UriMatcher match Questions & Answers:

match Method Overview
Try to match against the path in a url.
See Code Examples for other Android UriMatcher Methods: