Hi all,
I have to play an audio file from weblink .I have to do
1.I have to download the song to phone.
2.I have to play songs without downloading ie.,streaming.
I have used the following code to play from web url.
-----------
 MediaPlayer mp = new MediaPlayer();
                    try {
                                mp.setDataSource(PATH_TO_FILE);
                        } catch (IllegalArgumentException e) {

                                e.printStackTrace();
                        } catch (IllegalStateException e) {

                                e.printStackTrace();
                        } catch (IOException e) {

                                e.printStackTrace();
                        }
                    try {
                                mp.prepare();
                        } catch (IllegalStateException e) {

                                e.printStackTrace();
                        } catch (IOException e) {

                                e.printStackTrace();
                        }
                    mp.start();
-------------------------------------
But it was getting errors.and it is getting IOException .so what is
wrong in this.
If anybody know other way to to that task.please tell me.

Please help me.!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to