Ali
Ali

Reputation: 11550

No wifi connection blackberry simulator

I want to download data using HttpConnection , see the example below

  class ConnectionThread extends Thread
      {
       public void run()
        {
    try{

    showToast("in the run method");
    HttpConnection conn = null;
    String URL = "http://xxxxxxx.com/api/api.php?func=showAllCountries;interface=wifi";
    conn = (HttpConnection)Connector.open(URL);

    }catch(Exception e){
        showToast(e+"");


    }
    }

while running above code , on simulator it says Java.io.IOException No Wi-Fi connection found , Though in manage connection i can see simultor is conncted with Wifi , please why this is happening

Please

Upvotes: 1

Views: 496

Answers (1)

Shashank Agarwal
Shashank Agarwal

Reputation: 512

use deviceside= false;

in simulator wifi is not possible, simulator will access your system network , once you are on real device wifi will work if it is enabled in device.

Follow this link on how to make connections.

Upvotes: 1

Related Questions