If you think the Android project android-sqlite-server listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package org.devtcg.sqliteserver;
//www.java2s.comimport android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import org.devtcg.sqliteserver.impl.ServerImplProvider;
publicabstractclass SQLiteContentProviderServer extends ContentProvider
implements SQLiteServer {
private ServerImplProvider mServerImplProvider;
@Override
publicboolean onCreate() {
// Warm the database...
mServerImplProvider = new ServerImplProvider(this);
mServerImplProvider.get();
return true;
}
@Override
public Bundle call(String methodString, String arg, Bundle extras) {
return mServerImplProvider.get().onTransact(extras);
}
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
String sortOrder) {
// This method is not used for cursors. For consistency with the Service flow, we
// take the hackier path of using the BulkCursorToCursorAdaptor/CursorToBulkCursorAdaptor
// private APIs.
thrownew UnsupportedOperationException("Not part of the default implementation");
}
@Override
public String getType(Uri uri) {
thrownew UnsupportedOperationException("Not part of the default implementation");
}
@Override
public Uri insert(Uri uri, ContentValues values) {
thrownew UnsupportedOperationException("Not part of the default implementation");
}
@Override
publicint delete(Uri uri, String selection, String[] selectionArgs) {
thrownew UnsupportedOperationException("Not part of the default implementation");
}
@Override
publicint update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
thrownew UnsupportedOperationException("Not part of the default implementation");
}
}