Hello, i have a very big problem with httpConnection. I have an auto run app that pulls every x time a request to a basic secure http and retrieves an image. I have a Carrier with BES server.
Note: in de simulator everything works fine (i set the domain , user and pass in de MDS emulator properties files - MdsLogin.conf and rimpublic.property).
But in the real device i have two scenarios:
I start up my device and i run debug via usb. I see that my app make the request and response an HTTP 401. I thinks that its a domain problem. i dont know how to set via code (HttpConnection class) the domain, in the conn.setRequestProperty("Authorization","Basic " + encodeduserPass);
A can´t find a properties like setRequestProperty("domain", mydomain);
I start up my device and i run debug via usb. First i test de url connection with the device default browser and it pop up de login credentials (domain, user , pass) the domain have a default (it takes BES domain from somewhere ), a accept de credentials (and set remember my decition) and it works fine in the browser , i can see the image. Then i run my app and every works fine (response code 200) but after 4 or 5 minutes the request faild and give me a 401 (the same url and user pass that works fine seconds before)
Then when its fails i open again de default web browser and put the url, the pop up with the credentials appears again (Nevertheless i set remember credentials the first time).
The point is that mi HttpConnection works fine if first a put the credentials in the default web browser, but after 5 minutes that credentials seems to lost and my app fails.
I have to configure de domain in the device operative system or with java code ??.
Please help, i have to finish the project.
Thanks a lot.
pd: sory for mi english.
pd2: My device especifications are : 8800 v 18.104.22.168 (platform 22.214.171.124), the simulator where everything works fine is JDE 4.2 with plugin eclipse.