1private void checkDiskPermission ()
2{
3 if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
4 Toast.makeText(this, "No Permissions" , Toast.LENGTH_LONG).show();
5 ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0);
6 }
7 else
8 {
9 Toast.makeText(this, "Has Permissions" , Toast.LENGTH_LONG).show();
10 }
11}