Viewing Flash Video on Android 2.3?

1
Well I've tried anyway to run flash video on android 2.3 from the 4.0 forward going easy from a webview. Looking in google and on some forums I saw people riding through VideoView. It did not work for me.

    VideoView videoView = (VideoView) findViewById(R.id.videoView1);
    MediaController mediaController = new MediaController(this);
    mediaController.setAnchorView(videoView);
    Uri video = Uri.parse("http://www.ustream.tv/channel/5474055");
    videoView.setMediaController(mediaController);
    videoView.setVideoURI(video);
    videoView.start();

Good if anyone has any tips. Detail I do not want to have flash download and install. So gave more, wanted something native or without the need to download something. Well I'll leave a print error when I try to load the url in android 2.3 the same url loads all normal android 4.0 up.

    
asked by anonymous 24.03.2014 / 20:08

1 answer

1

The problem is on line 104 of the AoVivo class, in the onCreate () method. You use the setLayerType function, which was only added in API 11. So, before using it, you should check the version of the device, like this:

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){
    // Coloque a chamada da funcao setLayerType aqui dentro
} 
    
25.03.2014 / 17:46