0

I read this post which seems to explain this feature. But, I still don't know few things:

In my file explorer:

  1. When should I ask for this permission
  2. How do I ask (I know the intent->onActivityResult but, how do I check if I have to ask ?)
  3. What do I do when I want to do something with this SDCard permission ?

Thanks in advance

Community
  • 1
  • 1
Lukas Anda
  • 716
  • 1
  • 9
  • 30

1 Answers1

0

Acolleague just pointed me at this issue. What's the problem exactly? I see in the code that the manifest has:

It also needs the READ_* permission likely. That should give it full access to external storage. Storage Access Framework is a completely different system for interacting with user documents across apps, has nothing specifically to do with write access to sdcard.

And you've always needed that permission to read/write sdcard without root. Old apps didn't have it. The change in KK is that you can now read/write to your private data folder on sdcard WITHOUT needing the permission -- you only need it if you want to touch outside your private data.

So is the real problem that syncthing doesn't USE external storage (sounds confusing, but it only has the WRITE permission), doesn't expose it to the user as a target, or is there simply a bug under the hood somewhere...

Hope that helps!

Shubham Sharma
  • 2,763
  • 5
  • 31
  • 46
  • Well, maybe we missunderstood each other. I ask for permission with this: Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE); startActivityForResult(intent, 42); – Lukas Anda Jul 06 '16 at 06:50
  • Okey actually I had typed by mobile so reading can not be properly done OK I will try my best to solve ur question – Shubham Sharma Jul 06 '16 at 07:11