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
lr_33
Posts: 5
Registered: ‎01-11-2012
My Device: Blackberry Torch 9800

Blackberry Webworks App that accesses internet

I have an app that I want to open a webpage and display it immediately. I packaged my app two ways: through Ripple and through command prompt. After compiling, I loaded each compiled version of the app in the Blackberry 9800 Simulator. However, everytime I attempt to run the app in the simulator, I get the error message: "App Error 104 Uncaught: InterruptedOException" which leads to "Local connection timed out after ~120000" after selecting Continue. I don't know why I am getting this message, and I don't know about proxy servers or firewalls. Can someone please help me?

 

Here is my index.html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>
My Company
</title>
<meta http-equiv="refresh" content="0,url=http://www.myCompany.com/blackberry/index.html"/>
</head>
</html>

 

Here is my config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
version="1.0.0.0"
rim:header="RIM-Widget: rim/widget">

<name>MyCompany</name>
<description>This is version 1 of the application.</description>
<content src="index.html"/>
<access uri="http://www.myCompany.com/blackberry/index.html" subdomains="true"> </access>
<icon src="icon.png"/>
<rim:connection timeout="240000"></rim:connection>

</widget>

Please use plain text.
New Developer
Reapersa
Posts: 6
Registered: ‎07-17-2010
My Device: TBA

Re: Blackberry Webworks App that accesses internet

[ Edited ]

Hi there. As far as I am aware you would need to configure your device emulator to use a proxy on your local machine to access the internet. Have you tried deploying to a device and tried testing from there?

PS also I don't think you need the access uri portion of your config unless you wish to do an ajax call to your website you are in effect creating a website shortcut.

 

 

PPS: your doctype is also outdated it should look as follows....

 

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0" />

 

Please use plain text.
New Contributor
lr_33
Posts: 5
Registered: ‎01-11-2012
My Device: Blackberry Torch 9800

Re: Blackberry Webworks App that accesses internet

Thanks for the response. I don't know how to configure my device emulator. I'm not actually sure what my device emulator is. Is that the simulator? I haven't actually tested on a device so will try that.

 

Also, I added the access uri because I was initially getting error messages saying resouce not found in config.xml and look at access element (well, something along those words). Perhaps, I misunderstood the error message and something different was required.

 

Thank you for the note about the doctype being out of date. I will update that.

 

Do you happen to know if I need to add a feature element in my config file for accessing blackberry api?

Please use plain text.
BlackBerry Development Advisor (Retired)
jeffheifetz
Posts: 518
Registered: ‎07-18-2011
My Device: Bold

Re: Blackberry Webworks App that accesses internet

You need to run the MDS Simulator for a BlackBerry simulator to access the internet. Check out this thread



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Please use plain text.
New Contributor
lr_33
Posts: 5
Registered: ‎01-11-2012
My Device: Blackberry Torch 9800

Re: Blackberry Webworks App that accesses internet

Hi Jeff. Thanks for the response. I had run the MDS before the simulator. I saw that thread before I posted mine so that is not the issue.  I'm able to access the website through the browser on the simulator but not through my app. Any other suggestions?

Please use plain text.
New Developer
Reapersa
Posts: 6
Registered: ‎07-17-2010
My Device: TBA

Re: Blackberry Webworks App that accesses internet

could you post all the code in your index.html file ?
Please use plain text.
New Developer
Reapersa
Posts: 6
Registered: ‎07-17-2010
My Device: TBA

Re: Blackberry Webworks App that accesses internet

[ Edited ]

Try this....


<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0" />
<title>test</title>
<script type="text/javascript" language="javascript">
function Redirect()
{
window.location = 'http://www.myCompany.com/blackberry/index.html';
}
</script>
</head>
<body onload="javascript&colon;Redirect();">

</body>
</html>

Please use plain text.
New Contributor
lr_33
Posts: 5
Registered: ‎01-11-2012
My Device: Blackberry Torch 9800

Re: Blackberry Webworks App that accesses internet

Hi. The code I posted earlier is the entire contents of my index.html. I am going to try your suggestion today. Will let you know how that worked. Thanks for replying.
Please use plain text.