Hi Jens, Thanks for the reply. My goal of my program is to display images from couchbase lite database. My initial problem was that with the code i shown above, it was not displaying the image in the android emulator.
So i went by storing the image into drawable first. Then retrieve it from the drawable to store into the couchbase lite database. Then retrieve the image from the couchbase lite database and display it on an image view.
I realized my problem i did above was just a naming convention.
Attachment att = rev.getAttachment(“smoke.png”);
Attachment att = rev.getAttachment(“binarydata”);
Howerver i have another question for you,
is it possible to store 2 attachment into a single doucument ? and how ?
UnsavedRevision revision = document.getCurrentRevision().createRevision();
revision.setAttachment("image", "image/png", inputStream); //image is the name of caegory
revision.setAttachment("image1", "image/png", inputStream1); //image is the name of caegory
i keep getting this error when i insert data into my document? Could you educate me into what i should do when i see this warning ?
com.couchbase.lite.CouchbaseLiteException, Status: 409 (HTTP 409 conflict)