webview的网址属性不适用于Android,但适用于IOS

时间:2013-11-13 14:02:01

标签: titanium titanium-mobile appcelerator-mobile

我在Titanium appcelerator&中创建webview试图从服务器访问“远程URL”。我可以在IOS设备中获取该URL的“pdf”内容,但在Android中我收到以下错误。

"Enterprise Container Manager" - Policy service is not ready.

我在Android中遇到同样的错误,即使我在webview中对该URL进行了硬编码。在Android中获取PDF文件有任何限制吗?

我在日志中也遇到以下错误;

11-13 19:43:20.145: E/webview(10765): registerForStylusPenEvent onAttachedToWindow
11-13 19:43:20.145: E/webview(10765): registerForStylusPenEvent START
11-13 19:43:20.145: E/webview(10765): registerForStylusPenEvent END
11-13 19:43:20.900: E/webview(10765): removeForStylusPenEvent onDetachedFromWindow
11-13 19:43:20.900: E/webview(10765): removeForStylusPenEvent START
11-13 19:43:20.900: E/webview(10765): removeForStylusPenEvent END
11-13 19:43:21.085: E/Sensors(2294): Acc old sensor_state 1, new sensor_state : 0 en : 0

1 个答案:

答案 0 :(得分:2)

iOS有一个嵌入在webview中的文件QuickView,用于查看PDF和其他文档,Android没有这个,你无法在android中使用vanilla webview渲染PDF。

要支持PDF查看,您可以使用Intents,或从市场获取模块,或者创建自己的模块包装MuPDF等库。