Not sure how to go about writing a library; here's the relevant interface code I was given (in Java):
Content Provider - my app:
----------------------------
import android.content.ContentProvider
public class StatusProvider extends ContentProvider
{
public static final Uri CONTENT_URI = Uri
.parse("content://com.YourApplication.WhatTableToQuery");
public Cursor query(Uri uri, String[] projection, String selection,
String[] selectionArgs, String sortOrder)
{
long id = this.getId(uri);
SQLiteDatabase db = statusData.dbHelper.getReadableDatabase();
return db.query(StatusData.TABLE, projection, selection, selectionArgs,
null, null, sortOrder):
}
}
Content Resolver - their app:
----------------------------
public class StatusResolver
{
Uri.parse("content://com.YourApplication.WhatTableToQuery");
Cursor c = getContentResolver().query(uri, null, null, null, null);
}
Also need to add the following to manifest to allow other application access:
------------------------------------------------------------------------
<application>
<provider android:name=".StatusProvider"
android:authorities="content://com.YourApplication.WhatTableToQuery" />
</application>
How would I go about implementing this under b4a?