Error: Couldn't open this file (content://com.android.providers.media.documents/document/) -


i facing error when run app in mobile. error code:

unable open content: content://com.android.providers.media.documents/document/video%3a9635 java.io.ioexception: setdatasource failed.: status=0x80000000 

this code:

        mediacontroller mc = new mediacontroller(this);     mc.setanchorview(mvideoview);     mc.setmediaplayer(mvideoview);     //uri video = uri.parse(link);     mvideoview.setmediacontroller(mc);     mvideoview.setvideouri(uri.parse(c.getstring(1)));     mvideoview.start(); 

i got answer own

   //use gallery private void opengalleryaudio() {      intent intent = new intent();     intent.settype("video/*");     /*intent.setaction(intent.action_get_content);*/     intent.setaction(intent.action_open_document);     startactivityforresult(intent.createchooser(intent, "select video "), select_video);  } 

replace intent.action_get_content intent.action_open_document


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -