Home > OS >  How I get android/data/"package name"/
How I get android/data/"package name"/

Time:10-22

File filePath = new File(Environment.getDataDirectory().getAbsolutePath());

But i return only /data, so where is /data is located and how i get andrid/data/"package_name"/

CodePudding user response:

Though this is not the write way of getting the package name from your data folder but this can be used as a temporary solution:

File file=getApplicationContext().getFilesDir();

Thanks to @blackapps for making the solution more simple.

  • Related