BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 05-09-2010, 07:10 PM   #1
prasadrajapaksha
Knows Where the Search Button Is
 
Join Date: Dec 2009
Location: Sri Lanka
Model: 9000
PIN: N/A
Carrier: Software Engineer
Posts: 21
Default Blackberry device not connecting to the internet when run on device

Please Login to Remove!

Hi,

I have a software which need to validate user name and password when user log in. The software works perfectly on the emulator but when I run the same software on the device it does not work. When I press log in button it's do nothing even no error messages. But In the emulator it send relevant information to the server and validate the user. If credentials are OK users can see the next screen. Any body please help me on this.

Here is the relevant method.

public void validateUser(strServiceURL)
{
try
{
HttpConnection connection = null;
InputStream inputStream = null;
connection = (HttpConnection) Connector.open(strServiceURL, Connector.READ_WRITE, true);
inputStream = connection.openInputStream();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse( inputStream );
Element rootElement = document.getDocumentElement();
rootElement.normalize();
if(String.valueOf(rootElement.getElementsByTagName ("status").item(0).getChildNodes().item(0).getNode Value() ).equals("TRUE"))
{
UiApplication.getUiApplication().pushScreen( new DefaultView() );
}
else
{
Dialog.alert("User Invalid.");
}
}
catch ( Exception e )
{
System.out.println( e.toString() );
}
}


The strServiceURL variable include server url with user id and password binded to the query string. When I run on the emulator I added ";deviceside=true" additionally to the URL.

Thank you.

Prasad
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


4 Count Case GE ProLine 2 Bulb 120V T12 Electronic Fluorescent Light Ballasts picture

4 Count Case GE ProLine 2 Bulb 120V T12 Electronic Fluorescent Light Ballasts

$49.99



Inter-Global IG13-20EL electronic ballast 120v New Common Aquarium Light Ballast picture

Inter-Global IG13-20EL electronic ballast 120v New Common Aquarium Light Ballast

$19.95



PHILIPS ADVANCE Core-Coil Ballast Kit 71A5389- 1-100W M90 Metal Halide.FreeShip picture

PHILIPS ADVANCE Core-Coil Ballast Kit 71A5389- 1-100W M90 Metal Halide.FreeShip

$22.99



Keystone KTEB-232RIS-1-TP-SL Electronic Ballast, 2-Lamp, 32W T8, F32T8, 120V picture

Keystone KTEB-232RIS-1-TP-SL Electronic Ballast, 2-Lamp, 32W T8, F32T8, 120V

$19.89



3 Point Ballast Box Category 1 Tractor Quick Tach Hitch Counterweight Red Heavy picture

3 Point Ballast Box Category 1 Tractor Quick Tach Hitch Counterweight Red Heavy

$195.99



Metal Halide Ballast Kit 400W Multi 5 Tap 120V 208V 240V 277V 480V M59, LumaPro picture

Metal Halide Ballast Kit 400W Multi 5 Tap 120V 208V 240V 277V 480V M59, LumaPro

$54.49







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.