Neo
Neo

Reputation: 5228

Android : View Internal storage file in webview

I have a swf file which was created in Internal storage memory of android.

FileOutputStream fos = openFileOutput("sample.swf", Context.MODE_PRIVATE);

Is there any way to refer(embed) this file in my html page of webview?

Upvotes: 1

Views: 2273

Answers (1)

Neo
Neo

Reputation: 5228

Giving the path to internal storage file where needed as for above swf: "file:///data/data/--my_package_name--/files/sample.swf"

For embedding swf following lines worked:

<object width="100" height="100">
<param name="movie" value="file:///data/data/<package_name>/files/sample.swf">
<embed src="file.swf" width="100" height="100">
</embed>
</object>

Upvotes: 5

Related Questions