Amazon Gift Cards

Monday, June 20, 2011

Create Content Provider - Android Tool

Over at monmonja.com i created another tool (which i use most, so the generated code might make sense more to me) and its a tool to create content provider, the generated content provider class is one of the my oldest code structure which if someone knows a better way to do it then feel free to comment below and remember its an alpha tool so there might be some bugs on it.

Anyway without further talk, here is the link
http://www.generateandroidcode.com/android/contentProvider

7 comments:

Anonymous said...

It would be nice if you could make the link to open in a new tab.

Eric Hartwell said...

Love it! Can you be persuaded to share the source for the generator?

Almond said...

im actually renewing the generator from backend generator to use javascript to build the code and flash(downloadify) to let the user download it. Currently the javascript is using google closure and its complete (but not using closure template yet) but anyway the source is at http://androidmakerapp.appspot.com/static/js/android/content/ContentProvider.js

Anonymous said...

A few bugs in dataprovider:
- in the static section you initialize twice the matcher variable, once as
matcher = new UriMatcher(...)
and once as
matcher = sUriMatcher;

- in the insert function, you have
final Uri uri= ....
but it should be
final Uri result= ....

- in the delete function, the parentheses miss in the Table cases (but there are in the _ID cases)

Anonymous said...

Another error:
in the getCreatedScript the x.TABLE_NAME variable is inside a string and then it's not parsed. It should be moved out of the string.

Almond Joseph Mendoza said...

fixed the issues, thanks for reporting :)

Sampath said...

Wow. Simply superb tool. Thanks for creating this and letting us use it.