Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6070973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:59:39+00:00 2026-05-23T09:59:39+00:00

I try to load a .swf file from assets folder to a webview, but

  • 0

I try to load a .swf file from assets folder to a webview, but I am not able to display it.

Here is the code:

package com.androidpeople.view;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class WebViewExample extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);



    String html =
        "<object width=\"550\" height=\"400\"> <param name=\"movie\"   value=\"file:///android_asset/co.swf\"> <embed src=\"file:///android_asset/co.swf\" width=\"550\" height=\"400\"> </embed> </object>";
        String mimeType = "text/html";
        String encoding = "utf-8";
        ;
    WebView wv=(WebView) findViewById(R.id.webview);
    wv.getSettings().setJavaScriptEnabled(true);
    //wv.getSettings().setPluginsEnabled(true);
    wv.loadDataWithBaseURL("null", html, mimeType, encoding, "");
    wv.setWebViewClient(new HelloWebViewClient());



}
}
package com.androidpeople.view;

import android.webkit.WebView;
import android.webkit.WebViewClient;

public class HelloWebViewClient extends WebViewClient {

@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
    view.loadUrl(url);
    return true;
}

}

Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.androidpeople.view"
  android:versionCode="1"
  android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".WebViewExample"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>
<uses-sdk android:minSdkVersion="5" />

<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest> 

Now I got a new error:

06-30 06:17:35.207: ERROR/MetadataRetrieverClient(33): failed to extract an album art
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:59:40+00:00Added an answer on May 23, 2026 at 9:59 am

    Please used below code

    String html =
    "<object width=\"550\" height=\"400\"> <param name=\"movie\" value=\"file:///android_asset/co.swf\"> <embed src=\"file:///android_asset/co.swf\" width=\"550\" height=\"400\"> </embed> </object>";
    String mimeType = "text/html";
    String encoding = "utf-8";
    wv.loadDataWithBaseURL("null", html, mimeType, encoding, "");
    

    OR

    Reefer this link

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to us wp_enqueue_script to load my javascript, here is my code: <?php
i load in ActionScript a swf file. So far no Problem, but I didn't
Hii, I'm tring to load swf file to my flash application from a different
Hai i have a application which is try to load the swf,but i cannot
I am trying to load assets from an SWC into a SWF at compile
I have to load XML from external domain, so my code looks like this
I have a .swf file that I try to browse to and it loads
I have build one application in which I want to load SWF file build
I have a SWF file used as a banner advertisement but there is a
I made swf file that sends id to php, than php collects info from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.