android - 启动画面后无法加载 Worklight 应用程序的页面

标签 android splash-screen ibm-mobilefirst

我在启动画面显示后显示我的 Worklight 主页时遇到问题。 (有关信息,我的应用程序之前运行良好)。

在 res/drawable(s) 文件夹中添加了许多 spashscreen.png 文件后,我更新了 .java 主页类中的 java 代码:

super.setIntegerProperty("splashscreen", R.drawable.splashscreen);
super.loadUrl(getWebMainFilePath(), 5000);

然后我在我的 .html 主页中添加了以下内容:

<script type="text/javascript">
$(document).ready(function(){
// hide splash-screen
    navigator.spashscreen.hide();
    }
</script>

启动画面显示良好,5 秒后,屏幕变黑。

这是我的 htc 设备的错误日志:

03-08 16:08:08.354: E/libEGL(2722): call to OpenGL ES API with no current context (logged once per thread)
03-08 16:08:08.354: E/SurfaceTexture(1446): [SurfaceView] abandon: surfaceTexture(0x0x9df580) has been abandoned!
03-08 16:08:08.724: E/SurfaceTexture(1446): [Starting com.Maquette] abandon: SurfaceTexture(0x0xa1ca18) has been abandoned!
03-08 16:08:08.744: E/SurfaceTexture(1446): [com.htc.launcher/com.htc.launcher.Launcher] abandon: SurfaceTexture(0x0xa5ce18) has been abandoned!
03-08 16:08:13.068: E/SurfaceTexture(1446): [com.Maquette/com.Maquette.Maquette] abandon: SurfaceTexture(0x0x9df580) has been abandoned!

感谢您的帮助。

最佳答案

您可能想尝试@user2124658 在此线程中给出的答案:Worklight App Splash Screen on Android

如果您使用的是 Worklight 5.0.5.x,请尝试以下操作:

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    super.loadUrl(getWebMainFilePath());  // yes, this is an extra invocation
    super.setIntegerProperty("splashscreen", R.drawable.splash);
    super.loadUrl(getWebMainFilePath(), 5000);
}

如果您使用的是 Worklight 5.0.6.x,请尝试以下操作:

public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    super.setIntegerProperty("splashscreen", R.drawable.splash);
    super.bindBrowser(appView);
    super.loadUrl(getWebMainFilePath(), 5000);
}

关于android - 启动画面后无法加载 Worklight 应用程序的页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15297330/

相关文章:

android - 检查设备上是否安装了 Google map 应用程序

java - 为什么我无法设置 POST 变量的值?

android - Android 中 webviews 的页面 curl 效果

windows-phone-7 - 如何在 WP7 启动画面和具有相同启动画面的第一页之间进行无缝转换

websphere - Worklight - 使用 URL 从非 Worklight 应用程序调用推送通知适配器

ios - IBM MobileFirst : Application Authenticity rejection despite the application's authentic identity?

android - 如何创建 Circle ProgressDrawable 以在 Fresco 中使用?

java.lang.IllegalStateException : Could not execute method of the activity caused by Invocation and NPE error

ios - 带有事件指示器的启动画面

ios - 如何根据特定用户动态更改启动画面?