" Cannot play video sorry,this video cannot be played."
First here is the manifest xml code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="(cant post links so)schemas.android.com/apk/res/android"
package="com.AllFormatsVideoPlay"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.STORAGE"></uses-permission>
<uses-sdk android:minSdkVersion="8" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".AllFormatsVideoPlayActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
And the main code:
package com.AllFormatsVideoPlay;
import android.app.Activity;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.os.Environment;
import android.widget.*;
import android.net.*;
import java.io.*;
public class AllFormatsVideoPlayActivity extends Activity {
/** Called when the activity is first created. */
VideoView vView;
String vSource;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFormat(PixelFormat.TRANSLUCENT);
setContentView(R.layout.main);
//File clip=new File(Environment.getExternalStorageDirectory(),"VIDEO0030.mp4");
vView = new VideoView(this);
vView = (VideoView)findViewById(R.id.VideoView);
vView.requestFocus();
//vSource ="";
vView.setVideoURI(Uri.parse("i:/DCIM/100MEDIA/VIDEO0030.mp4"));
vView.setMediaController(new MediaController(this));
vView.start();
}
}
I marked with // some lines in my code i used to play before a file on my android device from the internet but now i want to play a video file wich is on my memory card on my android device or maybe its not on the memory card the directory is in the code.
I tried without i: but it didnt work either.
Thanks for help.