Hi,

We are developing an Android native app which has a Webview and its
source point to a server were we have deployed our web app. All works
fine, untill we want to play audio. On the jsp we have an iFrame which
src is "http://infant.antfarm.co.za/pukfm/player.asp?id=83";. On the
web browser it works fine, but as soon as we load the web app in an
Android Webview, we do not receive any response and get all sorts or
errors which is not helpfull.

Even when I set the parameter URL to be loaded in the webview I again
get connection problem in the emmulator.
 webView.loadUrl("http://infant.antfarm.co.za/pukfm/player.asp?
id=83");

I also tried to load the URL using the media player, but also without
any success (here is my source code for this):
   final MediaPlayer player = new MediaPlayer();
        try {
            player.setDataSource("http://infant.antfarm.co.za/pukfm/
player.asp?id=83");
        } catch (IllegalArgumentException e) {
            Log.e("MediaPlayer", "IllegalArgumentException: " +
e.getMessage());
        } catch (IllegalStateException e) {
            Log.e("MediaPlayer", "IllegalStateException: " +
e.getMessage());
        } catch (IOException e) {
            Log.e("MediaPlayer", "IOException: " + e.getMessage());
        }

        player.setOnBufferingUpdateListener(new
OnBufferingUpdateListener() {

            public void onBufferingUpdate(MediaPlayer mp, int percent)
{
                Log.i("Buffering", "" + percent);
            }
        });

        player.prepareAsync();

        player.setOnPreparedListener(new OnPreparedListener() {

            public void onPrepared(MediaPlayer mp) {
                player.start();
            }
        });

Any advice/help would be much appreciated.

Kind Regards
Jaco Gillman

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

Reply via email to