FileDocCategorySizeDatePackage
TrackerProvider.javaAPI DocAndroid 5.1 API4347Thu Mar 12 22:22:44 GMT 2015com.android.locationtracker.data

TrackerProvider

public class TrackerProvider extends android.content.ContentProvider
Content provider for location tracking. It is recommended to use the TrackerDataHelper class to access this data rather than this class directly

Fields Summary
public static final android.net.Uri
CONTENT_URI
private static final String
DB_NAME
private static final String
TABLE_NAME
private static final int
DB_VERSION
private static final String
LOG_TAG
private DatabaseHelper
mOpenHelper
Constructors Summary
Methods Summary
public intdelete(android.net.Uri uri, java.lang.String selection, java.lang.String[] selectionArgs)

        SQLiteDatabase db = mOpenHelper.getWritableDatabase();
        int result = db.delete(TABLE_NAME, selection, selectionArgs);
        getContext().getContentResolver().notifyChange(uri, null);
        return result;
    
public java.lang.StringgetType(android.net.Uri uri)

        throw new UnsupportedOperationException();
    
public android.net.Uriinsert(android.net.Uri uri, android.content.ContentValues values)

        SQLiteDatabase db = mOpenHelper.getWritableDatabase();
        long rowId = db.insert(TABLE_NAME, null, values);
        if (rowId > 0) {
            Uri addedUri = ContentUris.withAppendedId(CONTENT_URI, rowId);
            getContext().getContentResolver().notifyChange(addedUri, null);
            return addedUri;
        }
        return null;
    
public booleanonCreate()

        mOpenHelper = new DatabaseHelper(getContext());
        return true;
    
public android.database.Cursorquery(android.net.Uri uri, java.lang.String[] projection, java.lang.String selection, java.lang.String[] selectionArgs, java.lang.String sortOrder)

        SQLiteDatabase db = mOpenHelper.getReadableDatabase();
        // TODO: extract limit from URI ?
        Cursor cursor = db.query(TABLE_NAME, projection, selection,
                selectionArgs, null, null, sortOrder);
        getContext().getContentResolver().notifyChange(uri, null);
        return cursor;
    
public intupdate(android.net.Uri uri, android.content.ContentValues values, java.lang.String selection, java.lang.String[] selectionArgs)

        throw new UnsupportedOperationException();