diff options
Diffstat (limited to 'templates/other/ContentProvider/root')
-rw-r--r-- | templates/other/ContentProvider/root/AndroidManifest.xml.ftl | 11 | ||||
-rw-r--r-- | templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl | 50 |
2 files changed, 61 insertions, 0 deletions
diff --git a/templates/other/ContentProvider/root/AndroidManifest.xml.ftl b/templates/other/ContentProvider/root/AndroidManifest.xml.ftl new file mode 100644 index 0000000..6fa4afc --- /dev/null +++ b/templates/other/ContentProvider/root/AndroidManifest.xml.ftl @@ -0,0 +1,11 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android" > + + <application> + <provider android:name=".${className}" + android:authorities="${authorities}" + android:exported="${isExported?string}" + android:enabled="${isEnabled?string}" > + </provider> + </application> + +</manifest> diff --git a/templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl b/templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl new file mode 100644 index 0000000..e5b43b5 --- /dev/null +++ b/templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl @@ -0,0 +1,50 @@ +package ${packageName}; + +import android.content.ContentProvider; +import android.content.ContentValues; +import android.database.Cursor; +import android.net.Uri; + +public class ${className} extends ContentProvider { + public ${className}() { + } + + @Override + public int delete(Uri uri, String selection, String[] selectionArgs) { + // Implement this to handle requests to delete one or more rows. + throw new UnsupportedOperationException("Not yet implemented"); + } + + @Override + public String getType(Uri uri) { + // TODO: Implement this to handle requests for the MIME type of the data + // at the given URI. + throw new UnsupportedOperationException("Not yet implemented"); + } + + @Override + public Uri insert(Uri uri, ContentValues values) { + // TODO: Implement this to handle requests to insert a new row. + throw new UnsupportedOperationException("Not yet implemented"); + } + + @Override + public boolean onCreate() { + // TODO: Implement this to initialize your content provider on startup. + return false; + } + + @Override + public Cursor query(Uri uri, String[] projection, String selection, + String[] selectionArgs, String sortOrder) { + // TODO: Implement this to handle query requests from clients. + throw new UnsupportedOperationException("Not yet implemented"); + } + + @Override + public int update(Uri uri, ContentValues values, String selection, + String[] selectionArgs) { + // TODO: Implement this to handle requests to update one or more rows. + throw new UnsupportedOperationException("Not yet implemented"); + } +} |