Third-party applications are locked from recording SD cards from version 4.4.2 of Android

I am trying to write to the SD card from my Android application, this gives an error:

java.io.IOException: open failed: EACCES (Permission denied) from latest version           

- android version :-      4.4.2
- Kernel version :-       3.4.5-699287 dpi@SWDD5015 # 1
                          Thu Feb 13 20:28:09 KST 2014
- Build number :-         KOT49H.I9500XXUFNB3

Note. My application has permission

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

I believe that permission should be used to write to the SD card WRITE_MEDIA_STORAGE.

So when we try

<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />

He gives an error

Permission granted only to system applications

In the settings of the camera application, if we mention the SD storage card, then it can create images on the SD card, because it is a system application. If anyone has another solution for writing to an SD card from a third-party application, please share.

This question is definitely not duplicated, because before this assembly on one SAMSUNG device I could read / write to an external SD card.

, API API 19, :

  • Context.getExternalFilesDirs()
  • Context.getExternalCacheDirs()
  • Context.getObbDirs()

. API.

, com.example.foo Android/data/com.example.foo/ - . FUSE.

API 19 , , SD- API. , , .

+4

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


All Articles