I am creating a graph app with MP android chart library by PhilJay. I put a button which is meant to save the chart to my Gallery but its not saving on my Sony xperia Z2(Api 23 ). It saved on my leapdroid emulator and an injoo test phone . Please what could be the problem.
I also added the permission needed to the manifest.xml file
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>.
`
savebutton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
linechart.saveToGallery("new Line chart", 85);
linechart.setSaveEnabled(true);
Toast.makeText(getApplicationContext(), "graph saved ", Toast.LENGTH_LONG).show();
}
});`