Hi !

I follow exactly the instruction from
http://code.google.com/android/toolbox/apis/media.html to embed media file.
I created raw in res then add android.wmv and use the following code to
embed it. I don't know why it show R.raw cannot be resolved. How to resolve
?

...
        showAudio(this);
...

   void showAudio(Context context)
    {
        InputStream is = this.getResources().openRawResource(R.raw.android);

        MediaPlayer mp = MediaPlayer.create(context, R.raw.android);
        mp.prepare();
        mp.start();
    }

Thanks for help !

-- 
Many thanks and regards
LÊ THANH TÙNG
Da Nang, Vietnam

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to