Android VS Internal Storage Overview

Is there a difference between saving the service authentication token in the internal storage (in the file) and in the general settings?

+6
source share
3 answers

Not really, it's a matter of convenience. When using the general settings, you do not need to process the IO file.

+4
source

general preferences will be better than storing credentials in a file to open and read the file, this is tedious compared to using share preferences

+2
source

Although both options may be private. Traditional approach: if you have a pair of keys with a small key, use common preferences. If you have a large amount of data, refer to the internal storage. Internal storages are stored in files and are private to your application. The main disadvantage with a common advantage. if your application crashes / closes you, you will lose all your data in a general privilege.

Verdict:

If you use a common prefix. make sure your application does not crash. So my point is: go with internal storage. However, if your phone is rooted, anything can happen, nothing else remains private ...: /

0
source

Source: https://habr.com/ru/post/895130/


All Articles