I am using Intent.ACTION_OPEN_DOCUMENT_TREE to grant my application write access to external storage (on Lollipop and Marshmallow).
But I would like write to external storage in test application. Intent.ACTION_OPEN_DOCUMENT_TREE uses system dialog so I cannot grant the permission during tests. I also tried to allow it in application and then use it in tests but it is not shared - application project and test project are different packages.
Does anybody know some workaround that might e.g. grant permission for whole external storage for test purpose? Maybe by changing some system property?
adb shell setprop SOMEPROPERTY 1
Aucun commentaire:
Enregistrer un commentaire