Here I am getting image path from Native data
Here IMAGEPATH is the path of image from Camera.
ByteArrayOutputStream stream1 = new ByteArrayOutputStream();
// Compress image to lower quality scale 1 - 100
bitmap1.compress(Bitmap.CompressFormat.PNG, 100, stream1);
Object image = null;
try {
String path = null;
image = readInFile(IMAGEPATH);
} catch (Exception e) {
e.printStackTrace();
}
FlexLogger.createLog("path : " + IMAGEPATH);
// Create the ParseFile
parseFile = new ParseFile("file1", (byte[]) image);
Then save this
parseFile.saveInBackground(new SaveCallback() {
@Override
public void done(ParseException e) {
if(e==null){
}
else{
}
}
});
Put this file whenever required, user1 is the object of the Class which have column profilePicture
user1.put("profilePicture", parseFile);
0 Comment(s)