Android Content Resolver takePersistableUriPermission API below 19 no such method -


i`m using in order achieve following behavior:

user selects files via intent.action_open_document api above 19 (the new storage access framework) or via intent.action_get_content api below 19. files should stored in app`s list later use (open them). after files use:

uri uri = fileuri; final int takeflags = data.getflags()           & (intent.flag_grant_read_uri_permission           | intent.flag_grant_write_uri_permission); getapplicationcontext().getcontentresolver().takepersistableuripermission(uri, takeflags); 

for cases of api above 19 works fine, api below 19, example test api 14, got anr following error:

java.lang.nosuchmethoderror: android.content.contentresolver.takepersistableuripermission

what can problem? thanks,

update: seems it`s (persistent permission) done automatically in api below 14, means comment out code if api below 14.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -