SMS demo?

guys that I wanted a sample using messageconnection() or something that relates to the use
simulatin sms within a custom java application, I tried this link too and coulnd't find anythin

http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe

any help appreciated!

Download the JDE, open the workspace called "Samples" and reviewing the project called 'SMSDemo '.

Tags: BlackBerry Developers

Similar Questions

  • When sending sms, some no-contact. SMS and some no-contact. not get?

    Hi all

    I developed the sms application, when I send the SMS from this application, some no-contact. to sms but some no-contact. do not get.

    can someone help me?

    concerning

    Savi

    Hi all

    I solved this problem. now I can send message to anyone of this sms application.

    If anyone need this app, I'm writing this request here... This works perfectly...

    package sms.savi;

    Net.rim.device.api.ui import. *;
    Net.rim.device.api.ui.component import. *;
    Net.rim.device.api.ui.container import. *;
    Javax.microedition.io import. *;
    Import Java.util;
    import java. IO;
    Javax.wireless.messaging import. *;

    class SmsDemo extends UiApplication {}

    Constants
    // ----------------------------------------------------------------
    private static final int MAX_PHONE_NUMBER_LENGTH = 32;

    Members
    // ------------------------------------------------------------------
    Private EditField _sendText.
    Private EditField _address; A phone number for outgoing SMS messages.
    Private _status EditField.
    Private ListeningThread _listener;
    private SendThread _sender.
    private StringBuffer _statusMsgs = new StringBuffer(); Caching for
    improved
    performance

    private MessageConnection _mc;
    Private boolean _stop = false;

    _sendMenuItem private MenuItem = new MenuItem ("send", 100, 10) {}
    public void run() {}
    String text = _sendText.getText ();
    String addr = _address.getText ();

    If (text.length > 0 () & addr.length () > 0) {}
    Send (addr, text);

    }
    }
    };

    Static
    // ------------------------------------------------------------------
    private static String _openString = "sms: / /"; See connector

    information on the implementation.

    Public Shared Sub main (String [] args) {}
    Create a new instance of the application and the beginning
    the application on the thread of the event.
    SmsDemo sms = new SmsDemo();
    sms.enterEventDispatcher ();
    }

    Inner classes
    // ------------------------------------------------------------
    private class ListeningThread extends Thread {}
    synchronized Private Sub {} stop()
    _stop = true;

    try {}
    If (_mc! = null) {}
    Close the connection so that the thread will return.
    _mc. Close();
    }
    } catch (IOException e) {}
    System.Err.println (try ());
    }
    }

    public void run() {}
    try {}
    _mc = Connector.open (_openString) (MessageConnection); Closed
    by
    the
    Stop()
    method.

    for (; {
    If {(_stop)
    return;
    }

    Message m = _mc.receive ();
    receivedSmsMessage (m);
    }
    } catch (IOException e) {}
    Probably the stream has been closed.
    System.Err.println (try ());
    }
    }
    }

    /**
    * A simple abstraction of an sms message, used by the SendThread class.
    */
    private static final class SmsMessage {}
    private String _address;
    private String _msg;

    private SmsMessage (String address, String msg) {}
    _address = address;
    _msg = msg;
    }

    Private Message toMessage (mc MessageConnection) {}
    TextMessage m = (mc.newMessage) (text)
    MessageConnection.TEXT_MESSAGE, ' / / ' + _address
    + "");
    m.setPayloadText (_msg);

    return m;
    }
    }

    /**
    * A thread to handle outbound transactions.
    */
    private class SendThread extends Thread {}
    private static final int TIMEOUT = 500; MS

    Create a vector of objects SmsMessage with an initial capacity of 10.
    For this implementation, it is unlikely that more than 10 messages
    queued at a time given.
    private vector _msgs = new Vector (10);

    volatile Boolean _start private = false;

    The applications are pending.
    private synchronized {void send (address of the string, String msg)
    _start = true;
    _msgs. AddElement (new SmsMessage (address, msg));
    }

    Termination of the thread.
    synchronized Private Sub {} stop()
    _stop = true;

    try {}
    If (_mc! = null) {}
    _mc. Close();
    }
    } catch (IOException e) {}
    System.Err.println (e);
    updateStatus (try ());
    }
    }

    public void run() {}

    for (; {
    Adjustment of the wire.
    While (! _start &! _stop) {}
    Sleep for a bit so we don't spin.
    try {}
    Sleep (timeout);
    } catch (InterruptedException e) {}
    System.Err.println (try ());
    }
    }

    Exit condition.
    If {(_stop)
    return;
    }

    While (true) {}
    try {}
    SmsMessage sms = null;

    synchronized (THIS) {}
    If (! _msgs.isEmpty ()) {}
    SMS = _msgs.firstElement () (SmsMessage);

    Delete the item so that we don't send it again.
    _msgs. RemoveElement (SMS);
    } else {}
    _start = false;
    break;
    }
    }

    _mc. Send (SMS.toMessage (_mc));
    _mc. Close();
    System.Exit (0);

    } catch (IOException e) {}
    System.Err.println (e);
    updateStatus (try ());
    }
    }
    }
    }
    }

    private class SmsDemoScreen extends form {}

    Constructor
    private SmsDemoScreen() {}
    Dim str As String = "8971833590";
    String = msgStr "How are you?"
    setTitle (new LabelField ("Demo SMS", LabelField.USE_ALL_WIDTH));

    _address = new EditField ("to:", "", MAX_PHONE_NUMBER_LENGTH,)
    EditField.FILTER_PHONE);
    Add (_address);
    Add (new SeparatorField());
    _sendText = new EditField ("Message:", "");
    Add (_sendText);

    /*
    * _status = new EditField(); Add (_Status);
    */

    addMenuItem (_sendMenuItem);
    }

    /**
    Prevent save them dialog box is displayed.
    *
    * @see net.rim.device.api.ui.container.MainScreen #onSavePrompt)
    */
    public boolean onSavePrompt() {}
    Returns true;
    }

    /**
    * Close the application
    *
    * @see net.rim.device.api.ui.Screen #close)
    */
    {} public void close()
    _listener. Stop();
    _sender. Stop();
    Super.Close ();
    }
    }

    Constructor
    private SmsDemo() {}
    _listener = new ListeningThread();
    _listener. Start();

    _sender = new SendThread();
    _sender. Start();

    Screen SmsDemoScreen = new SmsDemoScreen();
    pushScreen (screen);
    }

    /**
    * Update the GUI with the data just got.
    */
    {} private void updateStatus (final String msg)
    invokeLater (new Runnable() {}
    public void run() {}
    Delete the string buffer.
    _statusMsgs.Delete (0, _statusMsgs.length ());
    _statusMsgs.Append (_Status.GetText ());
    _statusMsgs.Append ('\n');
    _statusMsgs.Append (MSG);
    _Status.SetText (_statusMsgs.ToString ());
    }
    });

    }

    /**
    * A simple formatting of received sms message.
    */
    Private Sub receivedSmsMessage (Message m) {}
    String msg_app = m.getAddress ();
    Address of string = m.getAddress ();
    String msg = null;

    If (m instanceof TextMessage) {}
    TextMessage tm = m (text);
    MSG = tm.getPayloadText ();
    }

    StringBuffer sb = new StringBuffer();
    SB. Append("Received:");
    SB. Append ('\n');
    SB. Append("destination:");
    SB. Append (Address);
    SB. Append ('\n');
    SB. Append("Data:");
    SB. Append (MSG);
    SB. Append ('\n');

    updateStatus (sb.toString ());
    }

    private send Sub (String addr, String data) {}
    _sender. Send (addr, data);
    }
    }

    Of

    Savi

  • How can I delay send SMS in IOS10.0.2?

    How can I delay the sending of SMS in IOS 10.0.2?

    Don't hit the Send button until you are ready to send it...

  • SMS over Wi - Fi

    I understand that this could be a problem of carrier, but I wanted to tender hand to see if anyone has the same problem.

    When I switch to the iPhone 7 more, I stopped to receive SMS over Wi - Fi.  I can send and receive the iMessage and I can send SMS on Wi - Fi, but I can't receive.  I am currently on AT & T.

    If I remove the SIM card from my phone and put it in 6 seconds of my wife, she also has the problem.  But with the SIM of my wife in her phone, it works very well.  Any ideas?  Can anyone else with AT & T test this?  (Turn on airplane mode and send an SMS over Wi - Fi and AT & T Wi - Fi.)

    If the question "follows" the SIM card, it seems to be a problem with AT & T.

  • Siri are not sent by SMS in iMessage (OS Sierra)

    This seems to be a strange problem that I can not find a solution. My Macbook is connected to my iPhone SE. They all run the two most recent software updates.

    When I manually type my messages (in iMessage) on my Macbook to a non - iOS user, everything works perfectly (message sent is green). The problem is Siri. When I use Siri orders to send text messages to a user non - iOS (on my Macbook), she will not send SMS, only iMessage (blue). This causes the red exclamation point saying that the message send failed. If I click on "try again" on this error, the message (green now) sends very well.
    On my iPhone, text messages transfer is set up and send as SMS is turned on.

    So, how can I me Siri to use SMS and send text messages to my contacts non - iOS without having to press 'try again' on each message? Note that this command works fine on my iPhone.

    When you type a message what receiver do you use?

    When you use Siri one used?

    You have several entries in your application to Contact for this person? Maybe it's select the wrong one.

  • 10 iOS iphone SMS open without entering a password!  You can respond to text messages without entering a password!

    10 iOS iphone SMS open without entering a password!  You can respond to text messages without entering a password!  How to fix my TEXT with my access code?

    Hi, jandianajones!

    Thank you for reaching out by Apple Support communities. From your post, I see that you want to stop your Messages to be accessible on the lock screen. I completely understand wanting to keep your conversations private and to prevent their access without your access code. I'd be happy to help you to know what options you have!

    For added convenience, app Notifications have a setting that allows them to be seen and interacted with on your lock screen. It is a setting entirely optional and can be disabled for individual applications under settings > Notifications. Tap the application that you want to adjust (in your case, Messages) and toggle the "Show on lock screen" switch in the off position. You can still receive alert sounds when a message arrives through to be notified, you have received one, but it will not appear on your lock screen. To view, unlock your iPhone and go directly to the Messages app.

    More information on Notifications, including how they work and what options you have with them, can be found here: Use of Notifications on iPhone, iPad and iPod touch

    See you soon!

  • Apple Watch is unsent SMS (texting) iMessages only

    I try to send through Siri texting (sms). I managed to write the message, I see it with a blue buble, but underneath, I have a "DO NOT SEND" only and not a button 'SEND '.

    I realized that to send the message, I just need to ask my wrist and it should go, but it does not work.

    If I activate iMessage on the iPhone, it works (not always, but very well).

    So is it possible to send SMS messages (no iMessages) with a Apple Watch?

    Thanks for your response

    Yes, it should work without problem. Try disconnecting your watch and re Peel. Also you restart phone and watch

  • iOS 10 SMS on iPad?

    How do I forward my texts from my iPhone to my iPad can't find the options in the settings?

    On the iPhone, settings > Messages > text Message Forwarding. Both devices must be on the same wi - fi network, and you will need to enter a PIN when asked.

    Set up SMS and MMS messaging

    Use this feature with any Mac, iPhone, iPad, or iPod touch that satisfies the requirements of continuity system. Make sure that your devices are configured as follows:

    • Each device is connected to iCloud with the same Apple ID.
    • On iPhone, go to settings > Messages > Send and receive. Make sure the Apple ID at the top of the screen is the same Apple ID you use for iMessage on other devices. Add a check to your address, phone number, so that you can be reached by both iMessage. Do the same on your iPad or iPod touch.
    • On iPhone, go to settings > Messages > transfer, text messages, then choose which devices to send and receive text messages from the iPhone. A verification code and then on each device. Enter this code on your iPhone.
    • On Mac, open Messages, and then choose message > Preferences. Click accounts, and then select your account from iMessage. Make sure the Apple ID shown here is the same Apple ID you use on other devices. Add a control to your phone number and email address.
  • iOS 10 no longer allows you to choose to send SMS

    Hi, I have upgraded to iOS 10 and I don't have the option key on an iMessage that invites the option to send SMS. I regularly use this function when I travel or am in areas without large internet service. I know I can disable iMessage but which is rather annoying. Is there a setting that I'm not aware? I plan on downgrading to iOS 9 if not.

    Have you checked the phone settings? Settings > Messages > Send as SMS > on.

  • How to automatically send an sms to the team?

    I would like to know if there is a way (setting) or an application that can automatically send an sms (txt) to my team?

    A 3rd party app called IFFT may enforce an assortment of things, among them actions based on SMS.

    For some recipes, as they call it, take a look on their website: https://ifttt.com/sms

  • IMessage IOS 10 Force to send SMS

    The IOS 10, you can is more keep your iMessage on hold and get a screen that appears and says "Send as a text Message" now a bubble appears with an exclamation mark, thumbs up/down, etc.

    When I'm in and out of service that may take several minutes for an iMessage figure out it cannot be sent. It's extremely annoying when I'm in poor service areas, which, once a trip can be often. I know that you can disable iMessage in settings, but I don't want to go back and forth constantly, I just want to be able to quickly get my message as a text message so that a single message... so annoying that this option has been removed.

    When I'm on the bad service, the blue bar at the top will remain at 80% for 5-10 minutes or more. Please Apple stop remove features...

    I urgently need this feature too. When you need to send an urgent message, in case of accident, I can't wait 10 minutes see iMessage has not sent the message. This often occurs if the receiver is in another country at the moment and has disabled the data roaming. If I change iMessage in preferences, then I can send a SMS but on all my iOS devices and all my Macs come alerts that say, that a new device has joined iMessage. I completely disabled Messages on the Mac, but this Message is delivered with a regular alert box. How can I pass this warnings completely.

  • I want iphone SMS sent automatically the time of I said. How can I do it?

    I have iPhone 6s in ios10 and I want to send SMS automatically in time for me. How can do this?

    This is not a feature of the iPhone.

  • Make messages by default SMS app when not on wifi

    Hi all. I just had a question about iMessage. I have a 6 s iPhone running iOS 10.0.1. I have no data. I love the new iMessage, and I would like to try it out, so yesterday I turned on iMessage. However, I was in a place with no WiFi, and one of my friends sent me an important through iMessage message. He said it was delivered, but I do not have it. I know that there is a way to send SMS iMessage by double tapping by clicking send as SMS, but it would be too difficult to get all of my contacts with the iPhones do it for me. Is there a way to make sure that when I send messages on WiFi to other users of the iPhone, the default values of the iMessage message, and when I'm not on WiFi, they by default for SMS? Or something like that?

    Thank you very much.

    N

    In theory, if you are not connected to data, Messages must use the WiFi. However, it is not always instantaneous. And, if you have other devices connected to the same Apple ID as an iPad or a Mac, you'll find that this does not always work as you want. I highly recommend that if you have not given cell phones on your iPhone, you disconnect from the iMessage and only use SMS.

  • No text message (SMS) to Apple Watch on OS 3

    Since the upgrade to iOS 10 on my 6 + and 3 watch OS, I'm more able to send my watch normal text messages, unless I have disable iMessage on my phone. iMessages are no problem, it is only when I try to send a product not apple.

    I tried enabling / disabling iMessage and 'Send as SMS' works, with reboot both phone and shows all the intermediate combinations. Nothing works. Sending SMS from my phone works fine. I have not matched and reset my watch and then re-paired.

    Now, I suspect that this is a bug in the watchOS 3. Also has anyone seen this problem? Someone at - it other ideas on how to fix it?

    Otherwise, I love all the new features of the new OS

    Hello

    Given the steps you've tried, I suggest you contact Apple technical support or make a Genius Bar reservation for assistance:

  • Questions SMS

    What iOS 10 will be updated to allow SMS texts to be sent from the iPhone?  SMS text send an iPhone

    Eveningnews wrote:

    What iOS 10 will be updated to allow SMS texts to be sent from the iPhone?  SMS text send an iPhone

    SMS is a function of carrier, contact them and let them know that you are unable to use their service.

Maybe you are looking for