I am trying to debug a problem I am having in my app. The issue is that getExternalFiles(dir) returns null in my android app but I am not sure why. I have the necessary permissions. This is a bug which exists on multiple devices and versions of android (2.3.5 and up). Let me know if you need any more information.
The line of code which is the problem is:
path = context.getExternalFilesDir(null) + "/database/mydata.db";
or
path = context.getFilesDir().getAbsolutePath() + "/database/mydata.db";
Thank you.
getFilesDir()is internal storage.getExternalFilesDir()is external storage. I assume you haven't put it in two different places? It's not going to appear in both magically...