我需要显示位于URL PDF文件 我的代码很容易...显示URL(PDF)中的WebView - 安卓
var link_condiciones;
var idioma = Left(Titanium.Locale.getCurrentLanguage().toLowerCase(),2);
if(idioma == "es") {
link_condiciones = "http://micoachingapp.net/webpanel/archivos/viewTermsES.html";
}
else{
link_condiciones = "http://micoachingapp.net/webpanel/archivos/viewTermsEN.html";
}
Ti.API.info("*** Link: " + link_condiciones);
// Creamos la ventana
var winCondiciones = Ti.UI.createWindow({
backgroundColor: clr_aux4,
extendEdges:[Ti.UI.EXTEND_EDGE_TOP],
barColor: clr_primario_fuerte,
tintColor: clr_primario_suave,
title: " ",
titleControl: Ti.UI.createImageView({ image: 'images/tituloSuperior.png' }),
rightNavButton: Ti.UI.createImageView({ image: 'images/dummy.png', width: 35, height: 35, borderRadius: 5 })
});
// Construimos el visor Web
var WebView = Ti.UI.createWebView({
top: '30dp',
width: Ti.UI.FILL,
height: Ti.UI.FILL,
url: link_condiciones
})
winCondiciones.add(WebView);
var btnAceptar = Ti.UI.createButton({
title: L("txt_acepto_terminos"),
borderRadius: radioArcoBoton,
backgroundColor: color_on,
color: 'white',
height: '7%',
bottom: 3,
width: '95%'
})
btnAceptar.addEventListener("click", function(){
RegistrarFecha(fecha, navWindow, winCondiciones, winAnt1, winAnt2);
});
winCondiciones.add(btnAceptar);
// Mostramos la ventana
if(IsAndroid()) {
winCondiciones.open();
}
else {
navWindow.openWindow(winCondiciones);
}
,但我不能看PDF,仅误差修改的LOTE在控制台。
[INFO] : TiUIWebView: (main) [2621,15443] Detected com.htc.software.Sense feature com.htc.software.Sense7.0
[INFO] : WebViewFactory: Loading com.google.android.webview version 51.0.2704.81 (code 270408100)
[INFO] : cr_LibraryLoader: Time to load native libraries: 2 ms (timestamps 7860-7862)
[INFO] : cr_LibraryLoader: Expected native library version number "51.0.2704.81", actual native library version number "51.0.2704.81"
[INFO] : cr_LibraryLoader: Expected native library version number "51.0.2704.81", actual native library version number "51.0.2704.81"
[INFO] : chromium: [INFO:library_loader_hooks.cc(143)] Chromium logging enabled: level = 0, default verbosity = 0
[INFO] : cr_BrowserStartup: Initializing chromium process, singleProcess=true
[ERROR] : ApkAssets: Error while loading asset assets/natives_blob_64.bin:
...
[INFO] : *** Lenguaje: es
[INFO] : *** Valor : 2016-08-12 18:00:00
[INFO] : *** Link: http://micoachingapp.net/webpanel/archivos/viewTermsES.html
[INFO] : TiUIWebView: (main) [48206,288996] Detected com.htc.software.Sense feature com.htc.software.Sense7.0
[WARN] : cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
[INFO] : cr_Ime: ImeThread is not enabled.
[ERROR] : SensorManager: uid = 10142
[INFO] : SensorManager: registerListenerImpl: listener = [email protected]ca6080, sensor = {Sensor name="BMA255 3-axis Accelerometer", vendor="Bosch", version=1, type=1, maxRange=39.24, resolution=0.15328126, power=0.2, minDelay=10000}, delay = 200000, handler = null
[WARN] : cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 21108
[WARN] : cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 21108
这是问题的代码。 它只有一个窗口,一个pdf和一个按钮。
Appelerador,SDK 5.3.1 GA 的Android 5
井外部设备浏览器中打开它,它会的工作,这是后话,因为很久以前我做......我该怎么办,你有什么建议。 –
不起作用!我的链接是:http://micoachingapp.net/webpanel/archivos/viewTermsES.html –