Open niklasdaute opened 7 years ago
Was it saved to the DCIM folder?
No it wasn't unfortunately, the error is a file not found exception =(
I faced this issue too. One way round the problem might be to try specifying the SDPath. For example:
button2.setOnClickListener(new View.OnClickListener() {
public void onClick (View v) {
Toast.makeText(Main.this, "Chart Saved", Toast.LENGTH_SHORT).show();
pieChart.saveToGallery(getFileName(fullPath),90)) {
}
});
This is at least, how I got round the issue of saving image to Gallery.
Hey guys i'm tring to work with
saveToGallery(String title)
in my application and this is how I implemented it in my code:The Toast is showing correctly, but unfornutately the chart is not saved to the gallery. There are no error messages or anything and the app doesn't crash. Did i do something wrong? Did i forget to add something? I added the permission to write to external storage in my manifest, by the way.
Thanks!