private static final String AUTHORITY = "com.example.cmomp";
private static final int PEOPLE = 1;
private static final int PEOPLE_ID = 2;
public String m(){
UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);
matcher.addURI("com.example.cmomp", "people", PEOPLE);
matcher.addURI("com.example.cmomp", "person/#", PEOPLE_ID);
Uri uri = Uri.parse("content://" + "com.example.cmomp" + "/people");
int match = matcher.match(uri);
switch (match) {
case PEOPLE:
return "vnd.android.cursor.dir/people";
case PEOPLE_ID:
return "vnd.android.cursor.item/people";
default:
return null;
}
}