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

后端 未结 5 1716
余生分开走
余生分开走 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

    On Android KitKat, it returns /data/data/{your package name}/files, however I imagine this could change depending on your platform version. Thus if you're just trying to dig through your filesystem and see a file, it's safe to use this path, but if you're using this path for some functionality across multiple platform versions, you should only reference it using getFilesDir().

提交回复
热议问题