Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>here you go project fixin'</p> <p><a href="http://esilo.pl/Yea.zip" rel="nofollow">http://esilo.pl/Yea.zip</a></p> <p>few things ... Renaud answer ... but there are more errors: </p> <pre><code>// there is no such constructor ... Android looking for simple SampleContentProvider() //public SampleContentProvider(Context context){ // mContext=context; //} @Override public boolean onCreate() { //so we move mContext initialization here mContext = getContext(); dbHelper = new DatabaseHelper(mContext); return true; } </code></pre> <p>next:</p> <pre><code>public static final class ContentProviderHelper { private ContentProviderHelper() {} //private static final String BASE_PATH = "yay"; we don't need it public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY); //you dont need it + "/" + BASE_PATH); public static final String CONTENT_ITEM_TYPE = ContentResolver.CURSOR_ITEM_BASE_TYPE + "/vnd." + COMPANY_NAME + "." + TABLE_NAME;//yay it's stupid :P BASE_PATH; public static final String CONTENT_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE + "/vnd." + COMPANY_NAME + "." + TABLE_NAME;//yay it's stupid :P BASE_PATH; public static final String ID = "_id"; public static final String TITLE = "title"; public static final String TEXT = "text"; } </code></pre> <p>next in test.java:</p> <pre><code> Uri uri = getContentResolver().insert( // we should replace SampleContentProvider.ContentProviderHelper.CONTENT_URI with CONTENT_URI + TABLE_NAME Uri.withAppendedPath(SampleContentProvider.ContentProviderHelper.CONTENT_URI, SampleContentProvider.TABLE_NAME), values); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload