HttpConnection не работает в реальном устройстве - Blackberry

это мой код

public String Serverconnection(String url) {

    String line = "";

    if (DeviceInfo.isSimulator()) {
        url = url + ";deviceSide=true";
    }
    try {
        HttpConnection s = (HttpConnection) Connector.open(url);//*i get the exception here*
        s.setRequestProperty("Content-Type",
                "application/x-www-form-urlencoded");
        s.setRequestProperty(
                "Accept",
                "text/html,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5");
        s.setRequestProperty(HttpHeaders.HEADER_ACCEPT_CHARSET, "UTF-8");
        s.setRequestMethod(HttpConnection.GET);
        InputStream input = s.openInputStream();
        byte[] data = new byte[10240];
        int len = 0;
        StringBuffer raw = new StringBuffer();

        while (-1 != (len = input.read(data))) {
            raw.append(new String(data, 0, len));
        }

        line = raw.toString();

        input.close();
        s.close();
    } catch (Exception e) {
        System.out.println("response--- excep" + line + e.getMessage());
    }
    return line;

}

этот код работает нормально, когда я бегу в эмуляторе. Но в реальном устройстве я получил исключение"details unavailable - not supported by VM" "APN is not specified."

Как я могу это исправить?

Ответы на вопрос(1)

Ваш ответ на вопрос