I am trying to display a interactive map that I have created with imapbuilder. The problem is when i load it in my webview I just get a blank screen. I have tried everything (am just wondering if my device can't handle flash have got sgs2 and Motorola xoom2 10.1in tablet with ICS on both). Here is my code for XML.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<WebView android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
For my .java;
import android.os.Bundle;
import android.app.Activity;
import android.os.Handler;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebView;
public class MainActivity extends Activity {
private Handler mHandler = new Handler();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags
(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
WebView view=(WebView)findViewById(R.id.webview);
view.getSettings().setPluginsEnabled(true);
view.loadUrl("file:///android_asset/Interactive.htm");
view.addJavascriptInterface(new MyJavaScriptInterface(), "Android");
}
final class MyJavaScriptInterface
{
public void ProcessJavaScript(final String scriptname, final String args)
{
mHandler.post(new Runnable()
{
public void run()
{
//Do your activities
}
});
}
}
}
In my assets folder is the Interactive.htm and sub folder with the flash files and stuff exported from the software I used. So where am I going wrong?
Did you add this permission to your manifest file?
<uses-permission android:name="android.permission.INTERNET" />