×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    12

    Not able send Send SMS in dual SIM phone C2

    Hi All

    I am trying following code to send SMS in Nokia dual SIM phone C2. When I have single SIM active, it works fine but if I have 2 SIMs active then phone hangs with screen saying "Sending text message"

    StringBuffer addr = new StringBuffer(20);
    addr.append("sms://");
    addr.append("+91");//India
    addr.append(phoneNumber);
    String address = addr.toString();

    try {
    smsconn4sending = (MessageConnection) Connector.open(address);

    TextMessage txtmessage = (TextMessage)smsconn4sending.newMessage(MessageConnection.TEXT_MESSAGE);

    txtmessage.setAddress(address);

    txtmessage.setPayloadText("My message");
    smsconn4sending.send(txtmessage);//
    }catch(IllegalArgumentException illegalArgumentException){
    form.deleteAll();
    form.append("IllegalArgumentException Error while sending sms");
    errorCode = 1;
    }catch(InterruptedIOException interruptedIoException){
    form.deleteAll();
    form.append("InterruptedIOException Error while sending sms");
    errorCode = 2;
    }catch(IOException ioException){
    form.deleteAll();
    form.append("IOException Error while sending sms");
    errorCode = 3;
    }catch(NullPointerException nullPointerException){
    form.deleteAll();
    form.append("NullPointerException Error while sending sms");
    errorCode = 4;
    }catch(SecurityException securityException){
    form.deleteAll();
    form.append("SecurityException Error while sending sms");
    errorCode = 5;
    }catch (Exception e) {
    form.deleteAll();
    form.append("Exception while sending sms");
    errorCode = 6;
    }

    if (smsconn4sending != null) {
    try {
    smsconn4sending.close();
    } catch (IOException ioe) {
    form.append("\n\nError while closing sms connection");
    errorCode = 5;
    }
    }

    Please let me if i can something to make it work fine even with dual active sims

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Not able send Send SMS in dual SIM phone C2

    I am currently investigating this issue. I will get back to you asap.

  3. #3
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Not able send Send SMS in dual SIM phone C2

    What actually happens here, is that when either SIM1 or SIM2 is selected from the SIM Manager Menu Option, the program works fine. But when "Ask every time" is selected in SIM Manager, the application gives control to the phone, the phone displays the SIM Selection Screen for a very short time (not enough time for the user to make a selection) and then the screen "Sending text Message" appears. But since the user hasn't specified which SIM card will be used for sending the SMS, the phone keeps trying to send the SMS and doesn't give the control back to the application.
    This is an error and it has been reported to Nokia.
    A way around it, is to make sure that either SIM1 or SIM2 is selected in the SIM Manager before running the application.

  4. #4
    Registered User
    Join Date
    Dec 2010
    Posts
    12

    Re: Not able send Send SMS in dual SIM phone C2

    Hi Skalogir

    Thank you very much

    You are right, it works well if I choose one of SIM as preferred. But once you select one sim as preferred, all out going calls and message are done through that SIM only and users may not like to do it. I hope Nokia will release a update to address this.

    Thanks again

Similar Threads

  1. Replies: 6
    Last Post: 2007-11-20, 13:09
  2. How to send Content type to send data to server
    By Basu in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2006-10-23, 02:19
  3. Replies: 1
    Last Post: 2006-08-21, 00:36
  4. Send message and dial phone from PC via bluetooth link to phone
    By gold5angel in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2004-11-24, 14:55

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •