So the problem I have is the following,
the following line of code throws a NullPointerException for some users of my app, yet i don`t know why
String state = Environment.getExternalStorageState();
if(Environment.MEDIA_MOUNTED.equals(state))
baseDir = getExternalFilesDir(null).getAbsolutePath();
else
baseDir = getFilesDir().getAbsolutePath();
to be more specific its this part
baseDir = getExternalFilesDir(null).getAbsolutePath();
This code is called in the OnPostCreate() and I also have the required permissions in case you wondered.
So getExternalFilesDir(null) returns null for some reason even though it would be mounted.
I also searched a bit on SO and found related post with the same question but no real answer only good one is this one.
So is this just a problem on some user phones or a problem in general on androids end ?