如何从扩展文件加载 webview 中的 swf 文件?

How do you load a swf file in webview from expansion file?

我有些文件超过了 Playstore 50MB 的限制。所以我查阅了 Google 并了解到我可以使用 Expansion Files 来绕过这个限制。我用我的文件制作了扩展文件,我可以通过查找一些示例使用 AssetFileDescriptor 运行 mp3 文件。如何获取文件路径以便在 webview?

中进行设置

我尝试使用 InputStream 但我迷路了:

ZipResourceFil expansionFile = APKExpansionSupport.getAPKExpansionZipFile(this,1,0);
InputStream fileStream = expansionFile.getInputStream('flash/main.swf');

这里怎么获取flash的路径?

How do you load a swf file in webview from expansion file?

几年前,Adobe 在 Android 停止了对 Flash 的支持。

How do I get the path to the file so I can set it in the webview?

没有路径,因为扩展 ZIP 条目没有单独的文件。如果你想要一个文件,你需要将数据从扩展ZIP复制到某个地方,比如internal storage