Last active
August 8, 2017 13:03
-
-
Save nikhilbansal97/bec738d9b8524ec6893919e6dc046e91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.nikhil.simpledatabase.database; | |
import android.content.ContentResolver; | |
import android.net.Uri; | |
import android.provider.BaseColumns; | |
public class DataContract { | |
public DataContract() { | |
} | |
public static class DataProvider implements BaseColumns{ | |
public static final String TABLE_NAME = "data"; | |
public static final String AUTHORITY = "com.example.nikhil.simpledatabase"; | |
public static final Uri BASE_ITEM_URI = Uri.parse("content://" + AUTHORITY); | |
public static final String PATH_TABLE = "data"; | |
public static final String PATH_ID_TABLE = "data/#"; | |
public static final String CONTENT_LIST_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE + "/" + AUTHORITY; | |
public static final String CONTENT_ITEM_TYPE = ContentResolver.CURSOR_ITEM_BASE_TYPE + "/" + AUTHORITY; | |
public static final String COLUMN_ID = BaseColumns._ID; | |
public static final String COLUMN_DATA_ITEM = "dataItem"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment