This code used to work but on Android 4.2 and OpenCV 2.4.4 it fails, but I don\'t know why. Can anyone shed any light on it for me?
Thanks for any help.
Baz<
From Android 6+
Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app...
And you need to add something like:
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED)
{
ActivityCompat.requestPermissions(
this,
new String[] { Manifest.permission.WRITE_EXTERNAL_STORAGE },
PERMISSION_REQUEST_WRITE_EXTERNAL_STORAGE);
}
https://developer.android.com/training/permissions/requesting.html