android - Adding ParseFile to JSONObject -


private void savepicture() {     bytearrayoutputstream stream = new bytearrayoutputstream();     thumbnail.compress(bitmap.compressformat.png, 100, stream);     final parsefile file = new parsefile("pic.png", stream.tobytearray());     file.saveinbackground(new savecallback() {         @override         public void done(parseexception e) {             if (e != null) {                 toast.maketext(generatereportactivity.this,                      "couldn't save image", toast.length_long);             } else {                 try {                     newitem.put("image", file);                     myreports.put(newitem);                 } catch (jsonexception ex) {                     utility.showmessage(ex.getmessage(),                          "json error picture", generatereportactivity.this);                 }             }         }     });     imgtakenphoto.setimagebitmap(null);     imgtakenphoto.destroydrawingcache(); } 

in method i'm trying save image captured camera (currently saved saved bitmap) , want add image attribute jsonobject newitem. newitem added myreports jsonarray. myreports put parseobject under key "myreports" , call saveinbackground(). however, problem when @ database, jsonobject picture attribute not showing.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -