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

Adobe AIR Development

Reply
New Developer
Posts: 47
Registered: ‎11-25-2010
My Device: Not Specified

Browser Application in Emulator

Hi,

 

I have implemented sample browser application and deployed in my tablet emulator, but whatever the url i give, it  is not connecting, the error it is giving is

 

 

The Following error was encountered while trying to retrieve the url  http://www.google.com

unable to determine ip address from the host name "google.com"
Name Error : The domain name does not exist.

 

 

My VM settings are :

 

NetWork Adapter      Bridged

Device status connected (checked)

Connected at power on (checked)

 

Network connection

Bridged Connection directly to the physical network

Replicate physical network (checked)

 

Can anyone help me on this ?

 

New Developer
Posts: 47
Registered: ‎11-25-2010
My Device: Not Specified

Re: Browser Application in Emulator

i feel bad that no responses from anyone,

 

this is the application i have followed

http://www.petefreitag.com/item/770.cfm,

 

Please let me know if anyone have developed the above mentioned application and made it success.

Please respond.

 

 

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Browser Application in Emulator

Hey ramesh,

Your post isn't being ignored or anything its just that no one probably has a valid solution for this yet. Ill look it over the link you posted and ill get back to you if I find anything. Don't lose hope just yet!
J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Browser Application in Emulator

ok so i've been working on it for a little bit. i've got some weird findings. first i copied and pasted the code in Flash Builder Burriot (4.5). I ran the debug it went to the dicated page "http://foundeo.com" and i could click through all the pages. But i could not edit the TextInput field at all. The keyboard application would pop up but it wouldnt take any inputs. So then i went back to the code and i manually typed in "http://google.com" and it gave me weird debug errors just by changing one bit of text. And then i did some other editing and undoing and the errors were gone. Assuming this was burrito acting up I went to the Flash Builder 4.0.1 install and tested out the code and i pasted the code ran the debug and same thing. could not edit the textinput field. so then i went back to the code and did the whole editing and putting in google.com instead and same errors as the burrito builder. i dont know whats going on. anyway so i edited did some undos and redos and saved and the erros mysteriously vanished. again i dont know whats going on. this time it would let me leave google.com hardcoded in. finally i ran the code and google.com showed up no problem. but even then the textinput would not take any inputs at all but i could browse through the links on the page.

 

so my conclusion is either the new SDK is really buggy or i need a restart or something on my computer. the page loads up fine if i hard code the address in but again i could not access the TextInput field so i couldnt go to any custom pages. ill try again tomorrow but for now try changing the http://foundeo.com text in the code to google.com instead and see if you can load the page.

 

the QNXStageWebView is really buggy from what i've read and i wouldnt be surprised if thats whats causing all the errors. so for now try hardcoding it in and see what happens. Here is the working code for google.com. Good luck!

 

 

package 
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.geom.Rectangle;
	import flash.text.TextField;
	
	import qnx.media.QNXStageWebView;
	import qnx.ui.buttons.LabelButton;
	import qnx.ui.text.TextInput;
	
	// The following metadata specifies the size and properties of the canvas that
	// this application should occupy on the BlackBerry PlayBook screen.
	[SWF(width="1024", height="600", backgroundColor="#cccccc", frameRate="30")]
	public class PlaybookTest extends Sprite
	{
		private var addressInput:TextInput;
		private var webView:QNXStageWebView;
		
		public function PlaybookTest()
		{
			addressInput = new TextInput();
			addressInput.x = 10;
			addressInput.y = 10;
			addressInput.enabled = true;
			
			var goButton:LabelButton = new LabelButton();
			goButton.label = "Go";
			goButton.x = addressInput.width + 10;
			goButton.y = addressInput.y;
			goButton.addEventListener(MouseEvent.CLICK, go);
			
			
			var closeButton:LabelButton = new LabelButton();
			closeButton.label = "Close";		
			closeButton.addEventListener(MouseEvent.CLICK, closeWindow);
			closeButton.x = (stage.stageWidth - closeButton.width) - 10;
			closeButton.y = 10;
			
			webView = new QNXStageWebView(); 
			webView.stage= stage;
			webView.autoFit=true;
			webView.viewPort = new Rectangle(10,100,stage.stageWidth,stage.stageHeight-100);
			webView.enableCookies = true; 
			webView.enableJavascript = true; 
			webView.enableScrolling = true; 
			webView.loadURL("http://google.com");
			
			addChild(addressInput);
			
			addChild(goButton);
			addChild(closeButton);
			
			stage.nativeWindow.visible = true;
		}
		
		private function closeWindow(event:MouseEvent):void{
			stage.nativeWindow.close();
		}
		
		private function go(event:MouseEvent):void {
			webView.loadURL(addressInput.text);
		}
	}
}

 

 

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
New Developer
Posts: 47
Registered: ‎11-25-2010
My Device: Not Specified

Re: Browser Application in Emulator

Thanks for the reply,

 

I have copied your code and run my application, the same thing was happend to me.

 

 

Unable to determine IP address from host name " google.com "

 

Can you let me know your VM settings for Network Adapter ? any firewall/proxy problem  for me ?

 

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Browser Application in Emulator

[ Edited ]

hey ramesh,

 

here is a screenshot of my vmware network settings:

 

Screen shot 2010-12-03 at 6.25.31 AM.png

 

let me know if you see any differences. good luck!

 

Edit: My current machine and screen shot is from a Mac. The windows one should have the same options just a different look. My windows machine is down and cant check its settings.

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Highlighted
New Developer
Posts: 14
Registered: ‎09-15-2010
My Device: 9700 Bold

Re: Browser Application in Emulator

I'm having the same problem running on Windows XP

 

It must be a router / firewall problem

 

Any help appreciated.

 

Brian.

 

The Following error was encountered while trying to retrieve the url  http://www.google.com

unable to determine ip address from the host name "google.com"
Name Error : The domain name does not exist.