/** Initialize a new matcher object without any matches, then use .addURI(String authority, String path, int match) to add matches */ public static UriMatcher buildUriMatcher() { // Initialize a UriMatcher with no matches by passing in NO_MATCH to the constructor UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH); /* All paths added to the UriMatcher have a corresponding int. For each kind of uri you may want to access, add the corresponding match with addURI. The two calls below add matches for the task directory and a single item by ID. */ uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS, TASKS); uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS + "/#", TASK_WITH_ID); return uriMatcher; }
/** Initialize a new matcher object without any matches, then use .addURI(String authority, String path, int match) to add matches */ public static UriMatcher buildUriMatcher() { // Initialize a UriMatcher with no matches by passing in NO_MATCH to the constructor UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH); /* All paths added to the UriMatcher have a corresponding int. For each kind of uri you may want to access, add the corresponding match with addURI. The two calls below add matches for the task directory and a single item by ID. */ uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS, TASKS); uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS + "/#", TASK_WITH_ID); return uriMatcher; }
/** Initialize a new matcher object without any matches, then use .addURI(String authority, String path, int match) to add matches */ public static UriMatcher buildUriMatcher() { // Initialize a UriMatcher with no matches by passing in NO_MATCH to the constructor UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH); /* All paths added to the UriMatcher have a corresponding int. For each kind of uri you may want to access, add the corresponding match with addURI. The two calls below add matches for the task directory and a single item by ID. */ uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS, TASKS); uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS + "/#", TASK_WITH_ID); return uriMatcher; }
/** Initialize a new matcher object without any matches, then use .addURI(String authority, String path, int match) to add matches */ public static UriMatcher buildUriMatcher() { // Initialize a UriMatcher with no matches by passing in NO_MATCH to the constructor UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH); /* All paths added to the UriMatcher have a corresponding int. For each kind of uri you may want to access, add the corresponding match with addURI. The two calls below add matches for the task directory and a single item by ID. */ uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS, TASKS); uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS + "/#", TASK_WITH_ID); return uriMatcher; }
/** Initialize a new matcher object without any matches, then use .addURI(String authority, String path, int match) to add matches */ public static UriMatcher buildUriMatcher() { // Initialize a UriMatcher with no matches by passing in NO_MATCH to the constructor UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH); /* All paths added to the UriMatcher have a corresponding int. For each kind of uri you may want to access, add the corresponding match with addURI. The two calls below add matches for the task directory and a single item by ID. */ uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS, TASKS); uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS + "/#", TASK_WITH_ID); return uriMatcher; }
/** Initialize a new matcher object without any matches, then use .addURI(String authority, String path, int match) to add matches */ public static UriMatcher buildUriMatcher() { // Initialize a UriMatcher with no matches by passing in NO_MATCH to the constructor UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH); /* All paths added to the UriMatcher have a corresponding int. For each kind of uri you may want to access, add the corresponding match with addURI. The two calls below add matches for the task directory and a single item by ID. */ uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS, TASKS); uriMatcher.addURI(TaskContract.AUTHORITY, TaskContract.PATH_TASKS + "/#", TASK_WITH_ID); return uriMatcher; }
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); final String authority = WeatherContract.CONTENT_AUTHORITY;
static void setAuthority(final String authority) { sURIMatcher = new UriMatcher(UriMatcher.NO_MATCH); sURIMatcher.addURI(authority, TrayContract.Preferences.BASE_PATH, ALL_PREFERENCE); // BASE/module sURIMatcher.addURI(authority, TrayContract.Preferences.BASE_PATH + "/*", MODULE_PREFERENCE); // BASE/module/key sURIMatcher.addURI(authority, TrayContract.Preferences.BASE_PATH + "/*/*", SINGLE_PREFERENCE); sURIMatcher.addURI(authority, TrayContract.InternalPreferences.BASE_PATH, INTERNAL_ALL_PREFERENCE); // INTERNAL_BASE/module sURIMatcher.addURI(authority, TrayContract.InternalPreferences.BASE_PATH + "/*", INTERNAL_MODULE_PREFERENCE); // INTERNAL_BASE/module/key sURIMatcher.addURI(authority, TrayContract.InternalPreferences.BASE_PATH + "/*/*", INTERNAL_SINGLE_PREFERENCE); }