Click here to Skip to main content
15,846,144 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to play vimeo video in android activity, all data included comments and other stuff is displaying but video is not playing.... here is my code
internet permisison in manifest has also been assigned.

.java file
Java
package com.example.interfaces;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;


public class MainActivity extends Activity {

	private WebView mWebview ;
   	protected void onCreate(Bundle savedInstanceState) 
	{
   		

   	   

   	        super.onCreate(savedInstanceState);
   	        setContentView(R.layout.webview);

   	        mWebview  = new WebView(this);

   	        mWebview.getSettings().setJavaScriptEnabled(true); // enable javascript

   	        final Activity activity = this;

   	        mWebview.setWebViewClient(new WebViewClient() {
   	            public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
   	                Toast.makeText(activity, description, Toast.LENGTH_SHORT).show();
   	            }
   	        });

   	        mWebview .loadUrl("http://vimeo.com/98306475");
   	        setContentView(mWebview );
   		}
   	

	
	}


.xml file

Java
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <VideoView
        android:id="@+id/videoView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true" />

</Relative
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900