Android: Retrieving shared preferences of other application

前端 未结 6 2095
迷失自我
迷失自我 2020-11-22 15:21

I have a settings application from which i have to retrieve other applications preferences, but i don\'t have the details of keys in them, how can i retrieve all the availab

6条回答
  •  庸人自扰
    2020-11-22 16:10

    Unfortunately the docs now don't even explain MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE, instead saying:

    This constant was depreciated in API level 17. Creating world-readable files is very dangerous, and likely to cause security holes in applications. It is strongly discouraged; instead, ....etc

    Since the depreciation, implementing file sharing between apps with sharedpreferences may be too risky, although it was simple. I'm not too concerned with security holes from the MODE_WORLD_READABLE mode in game apps where I just want to be able to transfer characters from one app to another. It's too bad they depreciated both sharing modes.

提交回复
热议问题