Blackberry BrowserField2 Provides Excessively Slow Download Time

I am currently trying to load some pages using BrowserField2, but the loading time is long. Loading the same page in OS Browser works fine (<5 seconds), but loading it in my application takes> 30 seconds. What could be the reason? Here is my code:

BrowserFieldConfig config = new BrowserFieldConfig(); config.setProperty(BrowserFieldConfig.NAVIGATION_MODE, BrowserFieldConfig.NAVIGATION_MODE_POINTER); config.setProperty(BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE); browserField = new BrowserField(config); BrowserFieldListener listener = new BrowserFieldListener() { public void documentCreated(BrowserField browserField, ScriptEngine scriptEngine, Document document) throws Exception{ // Show a loadinganimation } public void documentLoaded(BrowserField browserField, Document document) throws Exception{ try{ // Hide a loadingAnimation }catch(IllegalStateException es){ es.printStackTrace(); } } }; browserField.addListener( listener ); 

I had the same problem before I applied the BrowserFieldListener (and loading the animation) so that it had nothing to do with it. Did I miss something?

+4
source share

Source: https://habr.com/ru/post/1392958/


All Articles