Copy the shared preferences XML file from /data on Samsung device failed

前端 未结 6 775
粉色の甜心
粉色の甜心 2020-12-09 20:46

There\'s an exporting feature in my application. It\'s just a copy operation since all my settings are store in shared preference.

I just copy the xml file from /da

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-09 21:26

    I've tested in Samsung P1010 with:

    //I'm in a IntentService class

    File file = this.getDir("shared_prefs", MODE_PRIVATE);

    I got: "/data/data/package.name/app_shared_prefs"

    It works fine to me. I can run ffmpeg in this folder.

    Look:

    Context.getDir

提交回复
热议问题