0

I have 5 different videos in my raw folder in Android project made with Eclipse, but the problem is that

    String stringPath1 = "android.resource://"+getPackageName()+"/"+R.raw.firstVideo; 
    String stringPath2 = "android.resource://"+getPackageName()+"/"+R.raw.secondVideo;

when I display stringPath1 and stringPath2 in textview they are the same (R.raw._ is the same int). Therefore when I try to change videoPlayer path the path does not change. What could be the reason for that?

Kristians Kuhta
  • 53
  • 1
  • 4
  • 10

1 Answers1

0

instead of using path use InputStream.

to get the stream :

getResources().openRawResource(R.raw.firstVideo)

getResources().openRawResource(R.raw.secondVideo)

Good Luck.

Med Besbes
  • 2,001
  • 6
  • 25
  • 38