What path does “getApplicationContext().getFilesDir()” return?

后端 未结 5 1691
余生分开走
余生分开走 2020-12-17 23:07

I\'m doing a simple app in Android and in a certain part of the app I would like to create an Excel file and write in it. I\'ve already prepared everything to use jexcel lib

5条回答
  •  無奈伤痛
    2020-12-17 23:43

    What are you planning on using this file for? Do you want it usable by other apps too? Using getApplicationContext().getFilesDir() will give you /data/data/com.package/files but if you want a file that's easily accessible by yourself and other apps, you're better off using something like getExternalFilesDir()

提交回复
热议问题