I am developing video player app. I want this app to be appear as option on selecting video from sdcard, album or any folder of the phone . When i select my video player to play video, it takes to app but video is not playing. I have given permission to read and write external storage in manifest.Below is my code :
Intent in =getIntent();
file_path = in.getData().getPath();
System.out.println("file path from sdcard:"+file_path);
videoView =(VideoView)findViewById(R.id.video);
MediaController mediaController= new MediaController(this);
mediaController.setAnchorView(videoView);
Uri uri=Uri.parse(file_path);
videoView.setVideoURI(uri);
videoView.requestFocus();
videoView.start();
ERROR :
10-19 10:39:40.917: I/System.out(20430): file path from sdcard:/external/video/media/24363
10-19 10:39:40.987: E/MediaPlayer(20430): Uri is <URL suppressed>
10-19 10:39:40.997: E/MediaPlayer(20430): error (1, -2147483648)
10-19 10:39:41.017: E/MediaPlayer(20430): Error (1,-2147483648)
10-19 10:39:41.017: D/VideoView(20430): Error: 1,-2147483648
EDIT: testing phone : Android 4.1 with 32Gb inbuilt memory and does not have Sdcard.