I am facing an issue while trying to add a splash screenin Android.
Below is the code I used
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.bindBrowser(appView);
super.loadUrl(getWebMainFilePath(), 5000);
}
I see the splash image, but then after few minutes I get a blank screen and the app crashes.
When using Worklight, you can show splash screen in onWLInitCompleted method and leave onCreate method as default.
Below code test on Nexus 4, Andriod 4.2.2.
I dont know will it help you or not but just try to use this code...
Hope it works..
I do what you do in
onCreate
, but load the URL like this:Works for me (testing on Nexus 7, Android 4.2.2).