Dual apps can't access storage path /storage/emulated/999/Download/somefile.pdf
Asked Answered
M

1

8

I am trying to download a file from server to Download folder of andorid

As expected it is working fine

Problem

When user clones my app (dual app) , the cloned app (2nd app) throws SecurityException: Unsupported path /storage/emulated/999/Download/somefile.pdf

Research

Device : Redmi 5

App : File Manager (system app)

I found 2 options

  1. Internal Storage
  2. Storage for dual apps (it also has Download folder & other apps folder like Whatsapp)

Still my app throws SecurityException

Monocycle answered 29/4, 2019 at 11:0 Comment(0)
C
1

This is because android dual apps creates the new app instance separate from the normal file storage (kind of like a secure space) in this same way your original app won't be able to access the files of the cloned app. So in theory to make you. downloads function work again you need to find out where the new app instance has been cloned to (varies from device manufacturer) and then set that has the download location. Hope I Helped!

Cheer answered 7/1, 2020 at 22:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.