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

Web and WebWorks Development

Reply
New Contributor
Posts: 5
Registered: ‎02-07-2011
My Device: Not Specified

Develop an App that just displays an existing website

Hi All,

 

I have downloaded and installed the Webworks plug in with Eclipse etc and have this running as far as I can tell.

 

What I would like to do, to get into the swing of things, is to develop an application (web widget?) that will display a single website.

 

To this end I have done the following (from reading through the help section etc)

 

1. Created a Blackberry WebWorks application, and called it something.

2. Set a foreground start page as http://www.domain.com

3. Filled in some other things in there like Author etc

4. In the permissions, added http://www.domain.com to the domains that the app will be allowed to access.

5. Added ALL the features available (I realise I may not need all of them)

 

I then right clicked on the project and "Run As Blackberry simulator"

 

This opens up the simulator, and all I get is a white screen........

 

But if I open the browser on the simulator, I am able to get webpages and browse the internet etc.

 

Is my process so far correct? And if so, what have I not done, or done incorrectly....

 

Would greatly welcome a push in the right direction.

 

Many thanks

 

 

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Develop an App that just displays an existing website

It sounds like the application is unable to access the content of the target page.  Do you know if any redirects occur when loading the initial URL (that might change the domain)?  An example of this in the wild is Google's home page.  Loading www.google.com usually redirects you to a localized version of this app (such as www.google.ca).

 

As a proof of concept, try changing the access element from <access uri="http://www.domain.com" subdomains="true"/> to the following:  <access uri="*" subdomains="true"/>

 

If this change allows you to see the content of the target page, it means there is an access permission with only whitelisting the one domain.  If you continue to get a white screen, there could be an issue with which network gateway is trying to be used.

 

Have you change the order of network transports listed in the "Connection" section of the config.xml document?

 

If you wait while the white screen is loading, do you eventually see Web content?

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
Posts: 5
Registered: ‎02-07-2011
My Device: Not Specified

Re: Develop an App that just displays an existing website

Thanks for the info  astanley :smileyhappy:

 

Hmm, I am not sure I have my config.xml set up with everything it needs....

 

Are them some example config.xml's about that I could look at that would include the usual settings for connections etc so my widget can connect to and display a website?

New Contributor
Posts: 5
Registered: ‎02-07-2011
My Device: Not Specified

Re: Develop an App that just displays an existing website

[ Edited ]

Hmmm, the website I try and show in my sample seems to make a difference of it working or not....

 

If my config.xml includes bbc.co.uk or google.co.uk then it works - eg:

 

  <content src="http://www.bbc.co.uk"/>

  <feature id="blackberry.ui.dialog" required="true" version="1.0.0"/>
  <access uri="http://www.bbc.co.uk" subdomains="true">

  </access>

 

But if I change that for one of my websites eg

 

  <content src="http://www.mywebsite.co.uk"/>

  <feature id="blackberry.ui.dialog" required="true" version="1.0.0"/>
  <access uri="http://www.mywebsite.co.uk" subdomains="true">

  </access>

 

Then it does not work - I just get a White screen with the data/up/down arrows in the top left going nuts... or I get the following message

 

The Resource - http://www.mywebsite.co.uk/ - could not be retireved because it was not found in the config.xml...

New Contributor
Posts: 5
Registered: ‎02-07-2011
My Device: Not Specified

Re: Develop an App that just displays an existing website

Working now with

 

<access uri="*" subdomains="true">

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Develop an App that just displays an existing website

Is www.mywebsite.co.uk an actual website that can be loaded?  If not, the WebWorks application will be unable to retrieve the content, and I would expect you would see the white screen (which is a default loading screen).

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
Posts: 5
Registered: ‎02-07-2011
My Device: Not Specified

Re: Develop an App that just displays an existing website

Yep Astanley,

 

The website I am after displaying is an actual website.

 

Working with uri="*" rather than the actual URL.......