File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Does anyone has the example of Content Provider Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Reply locked New topic
Author

Does anyone has the example of Content Provider

chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629

Does anyone have the simple code for content provider to use with database.
Code snippets with Manifest are welcome.


[AG: The problem boils down to Storing images in DB, another topic on same problem, closing this one]


http://www.androcid.com/
Pramod P Deore
Ranch Hand

Joined: Jul 15, 2008
Posts: 629

search in google you will get many examples like this


Life is easy because we write the source code.....
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

If you have android installed on your system, go to {installation_dir}\platforms\android-x.x\sample\SearchableDictionary application, this is a sample application which uses a Content Provider and database.

[Edit] The dictionary project is also available online here or you can see the Notepad Sample App...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629

Actually I wanted how to store the image using content provider I have tried the example they gave on developer.android.com
But there you have to use Media class.
I want to store in my own database which I have created and has the fields like string , integer.

Not able to understand the issue on androids official portal.
Here's the link.
Android issue

Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does anyone has the example of Content Provider
 
Similar Threads
what does this do?
how to get distinct raw contact id
Encrypting Password in Database
It is possible to start another session within the pages?
Unicode problem with Reading XML with utf-8 content into Unicode database