Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package com.achie.gs1; public class SampleProvider extends ContentProvider{ public static String AUTHORITY = "com.achie.gs1.SampleProvider"; public static final Uri CONTENT_URI = Uri.parse("content://"+AUTHORITY+"/animals"); public static final String ANIMALS_MIME_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE+"/vnd.achie.gs1.animal"; public static final String ANIMAL_ITEM_MIME_TYPE = ContentResolver.CURSOR_ITEM_BASE_TYPE+"/vnd.achie.gs1.animal"; private SampleDatabase mDatabase; private static final int GET_ANIMALS = 0; private static final int GET_ANIMAL_ITEM = 1; private static final int ANIMAL_SUGGEST = 2; private static final int SHORTCUT_REFRESH = 3; private static final UriMatcher sUriMatcher = buildUriMatcher(); private static UriMatcher buildUriMatcher() { UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH); // Get animals matcher.addURI(AUTHORITY, "animals", GET_ANIMALS); matcher.addURI(AUTHORITY, "animals/#", GET_ANIMAL_ITEM); // To get suggestions matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_QUERY, ANIMAL_SUGGEST); matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_QUERY + "/*", ANIMAL_SUGGEST); matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_SHORTCUT, SHORTCUT_REFRESH); matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_SHORTCUT+"/*", SHORTCUT_REFRESH); return matcher; } @Override public boolean onCreate() { mDatabase = new SampleDatabase(getContext()); return true; } @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { switch(sUriMatcher.match(uri)) { case ANIMAL_SUGGEST: if (selectionArgs == null){ throw new IllegalArgumentException(" selectionArgs must be provided for the uri for suggestion at a:\n "+uri); } return searchAnimals(selectionArgs[0]); case GET_ANIMALS: if (selectionArgs == null){ throw new IllegalArgumentException(" selectionArgs must be provided for the uri for searching animals at a:\n "+uri); } return searchAnimals(selectionArgs[0]); case GET_ANIMAL_ITEM: return getAnimal(uri); case SHORTCUT_REFRESH: return refreshShortcut(uri); default: throw new IllegalArgumentException("Unknown Uri at a: "+uri); } } @Override public String getType(Uri uri) { switch (sUriMatcher.match(uri)) { case GET_ANIMALS: return ANIMALS_MIME_TYPE; case GET_ANIMAL_ITEM: return ANIMAL_ITEM_MIME_TYPE; case ANIMAL_SUGGEST: return SearchManager.SUGGEST_MIME_TYPE; case SHORTCUT_REFRESH: return SearchManager.SHORTCUT_MIME_TYPE; default: throw new IllegalArgumentException("unknown Url "+uri); } } private Cursor refreshShortcut(Uri uri) { String rowId = uri.getLastPathSegment(); String[] columns = new String[] { BaseColumns._ID, SampleDatabase.ANIMAL_NAME, SearchManager.SUGGEST_COLUMN_SHORTCUT_ID, SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID }; return mDatabase.getAnimal(rowId, columns); } private Cursor searchAnimals(String query) { query = query.toLowerCase(); String[] columns = new String[] {BaseColumns._ID, SampleDatabase.ANIMAL_NAME}; return mDatabase.getAnimalMatches(query, columns); } private Cursor getAnimal(Uri uri) { String rowId = uri.getLastPathSegment(); String[] columns = new String[] {SampleDatabase.ANIMAL_NAME}; return mDatabase.getAnimal(rowId, columns); } public int delete(Uri uri, String selection, String[] selectionArgs) {return 0;} public Uri insert(Uri uri, ContentValues values) {return null;} public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { return 0; } }