Android MODE_WORLD_READABLE

I am building an application with API level 19 and I am using:

// download the file input = connection.getInputStream(); fOut = openFileOutput("example.json",MODE_WORLD_READABLE); 

he says that โ€œContext.MODE_WORLD_READABLE field is out of dateโ€, is there any alternative or addition of @SuppressWarning, is there no problem using it? thank you

+6
source share
1 answer

Creating world-readable files can be a security flaw, so Google no longer supports this practice. In particular, I cannot think of why the JSON file should be readable.

If you want the application to make content available for other applications, use FileProvider .

+9
source

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


All Articles