Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 22
Registered: ‎07-22-2009
My Device: Not Specified

AT&T 9700 not loading any referenced items in BrowserField

[ Edited ]

So I have a working embedded BrowserField implementation on 5.0 that runs on many devices without a problem.  It uses a CSS, and it is loaded either from resources (localSmiley Happy or SDCard.

 

On the 9700 it is completely ignored!  I've verified that it is in fact finding the resource, and putting the SDCard uri in the on device browser renders correctly with the stylesheet.

 

I've tried putting on the renderingoptions.ENABLE_CSS property and a few others that I can think of.   Any ideas?

Developer
Posts: 22
Registered: ‎07-22-2009
My Device: Not Specified

Re: 5.0 BrowserField ignoring CSS on AT&T 9700 5.0.0.602 only

Bump ..

Developer
Posts: 22
Registered: ‎07-22-2009
My Device: Not Specified

Re: 5.0 BrowserField ignoring CSS on AT&T 9700 5.0.0.602 only

More info:

 

It won't load any referenced content!

 

We  can't pick up img tags (thumbnails not loading)

as well as the stylesheet.

 

Also, if I inline the stylesheet, it works fine, so it's definitely the ignoring the content problem.

 

Highlighted
Developer
Posts: 26
Registered: ‎07-23-2008
My Device: Not Specified

Re: 5.0 BrowserField ignoring CSS on AT&T 9700 5.0.0.602 only

Here is the code we used on the 9700:

 

 

import net.rim.device.api.browser.field2.BrowserField;
import net.rim.device.api.ui.container.MainScreen;

public class BrowserScreen extends MainScreen {
	private BrowserField browserField;

	public BrowserScreen() {
		super();
		browserField = new BrowserField();
		add(browserField);
		String request = "file:///SDCard/HelloBrowserField/hello.html";
		browserField.requestContent(request);
	}
}

 

import net.rim.device.api.ui.UiApplication;

public class HelloBrowser extends UiApplication {
	public HelloBrowser() {
		pushScreen(new BrowserScreen());
	}

	public static void main(String[] args) {
		HelloBrowser theApp = new HelloBrowser();
		theApp.enterEventDispatcher();
	}
}

 

 

And hello.html:

 

 

<html>
<head>
<title>HELLO!</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<p align="center">
HELLO!
</p>
<p align="center">
<img src="hello.png"/>
</p>
</body>
</html>

 

 

On the AT&T 9700, the image reference is broken and the style sheet is not applied. Every other device we tried this code on worked fine.

 

Any ideas? Thanks in advance.

Developer
Posts: 22
Registered: ‎07-22-2009
My Device: Not Specified

Re: 5.0 BrowserField ignoring CSS on AT&T 9700 5.0.0.602 only

Bump!  Anyone have any ideas?

BlackBerry Development Advisor
Posts: 15,752
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: 5.0 BrowserField ignoring CSS on AT&T 9700 5.0.0.602 only

What BlackBerry device software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.

 

Are you only seeing this with local resources?  Do pages load correctly when accessed online? 

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 22
Registered: ‎07-22-2009
My Device: Not Specified

Re: 5.0 BrowserField ignoring CSS on AT&T 9700 5.0.0.602 only

Hi Mark,

 

Thanks for looking ... Software is 5.0.0.602 ,also see it on 5.0.0.328 platform 4.2.0.128

 

The files load correctly in the device browser if we point it at it by doing:

 

file:///SDCard/test.html in the goto.

 

We haven't tried online as these are not intended to be hosted files, and given that the html and related pieces all work on every other BlackBerry we try on the embedded (over 20 different carrier / phone combos so far), and that the content works on the browser on that phone, and with each desktop browser we try, we're fairly confident it's not a content problem.   We also have tried various bits of content, and have broken it down to the very simple test piece that was posted above.

 

As background, I have been doing BlackBerry software since version 4.0, and have been doing cutom browserfield implementations since 4.1, do I have quite bit of experience with them!

 

Any insight you guys might be able to help us with would be most appreciated

 

Thanks,

 

ron

BlackBerry Development Advisor
Posts: 15,752
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: 5.0 BrowserField ignoring CSS on AT&T 9700 5.0.0.602 only

I've been able to reproduce this using BlackBerry Device Software version 5.0.0.602.  I also tried a newer version (5.0.0.1014) and found that it worked correctly.  I haven't located the exact version the fix was applied to, but it has already been fixed.

 

The page does work fine when using the BlackBerry Browser.  So you may be able to work around this by opening your content in the browser instead of using a BrowserField.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 22
Registered: ‎07-22-2009
My Device: Not Specified

Re: 5.0 BrowserField ignoring CSS on AT&T 9700 5.0.0.602 only

[ Edited ]

Mark, any chance we could get some more details on the bug?  Using a browser is really not a good option for us (completely not what the app is about) Also, 602 is the currently shipping version of firmware from AT&T so we're pretty dead in the water on that front.

 

Also, do you have any ideas whether using the 4.x version of the BrowserField would run into the same issue on this platform?

 

Lastly, do you know if this will affect anyone other than the AT&T Bold 9700?

 

Thanks,

 

Ron

 

 

Developer
Posts: 22
Registered: ‎07-22-2009
My Device: Not Specified

Re: 5.0 BrowserField ignoring CSS on AT&T 9700 5.0.0.602 only

Mark,

Also, when you mention your version 1014, is that the package number or the application number?  In my case, I'm running package 1014, with app version 602 that I'm still seeing this on, and according to all docs this is the most recent available for the AT&T phone.