Skip to content

Instantly share code, notes, and snippets.

@barmgeat
Last active September 15, 2018 20:40
Show Gist options
  • Save barmgeat/503247da554c0f4b6b2d1cd900febb8b to your computer and use it in GitHub Desktop.
Save barmgeat/503247da554c0f4b6b2d1cd900febb8b to your computer and use it in GitHub Desktop.
Provider SQLite Android Content Provider
public class AppProvider extends ContentProvider {
private HelperClass mDbHelper;
@Override
public boolean onCreate() {
mDbHelper = new HelperClass(getContext());
return true;
}
@Nullable
@Override
public Cursor query(@NonNull Uri uri, @Nullable String[] strings, @Nullable String s, @Nullable String[] strings1, @Nullable String s1) {
return null;
}
@Nullable
@Override
public String getType(@NonNull Uri uri) {
return null;
}
@Nullable
@Override
public Uri insert(@NonNull Uri uri, @Nullable ContentValues contentValues) {
return null;
}
@Override
public int delete(@NonNull Uri uri, @Nullable String s, @Nullable String[] strings) {
return 0;
}
@Override
public int update(@NonNull Uri uri, @Nullable ContentValues contentValues, @Nullable String s, @Nullable String[] strings) {
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment