SMS Via J2ME

Hi, can I know anyone of you can lend a help on how to send SMS via J2ME? Is there a way to do it or maybe is there any sample codes that can be of any help. Thanks in advance....

Hi,
there is no support in J2ME for SMS, please refer these links
http://developer.java.sun.com/developer/community/chat/JavaLive/2002/jl0625.html
http://jcp.org/jsr/detail/120.jsp

Similar Messages

  • SMS via GPRS

    Does anyone know how to make a MIDLET that can send sms through GPRS?
    Can i use HTTPConnection to do that and how....
    Please Help...

    Dear printisor,
    Based on your reply, does it means that i should send parameters through gprs to my php script, then php script process parameters sent by j2me, then sends it through sms gateway??? Does the process runs like this???
    i'm able to send parameters via gprs to php, but i dont know how to send sms via php... :-D

  • Help! Send sms using j2me

    Hi, i try to send a sms from my midlet to a smsc. It worked in wireless toolkit emulator (as seen from network monitor and WMA console). However, trying in real phone (Nokia 7610) it doesn't seems to send the sms out. Do anyone have experience in sending sms successfully via j2me installed in N7610? Please help me how to send sms or any special settings are needed in my Nokia 7610.
    A portion of my code is like that:
    MessageConnection outConn = (MessageConnection) Connector.open("sms://+106423");
    outMsg = (TextMessage) outConn.newMessage("text");
    outMsg.setPayloadText("testing");     
    outConn.send(outMsg);
    Please help.

    http://www.google.com/search?hl=en&q=J2ME+tutorial

  • Sending SMS via Bluetooth not working

    Hi,
    I have two Nokia phones, an N73 and an older 6600. I was able to pair both with the Bluetooth in my MacBook Pro SR.
    I can access the web via dial-up networking, so that's working fine.
    However, I am unable to send SMS via AddressBook over the phone. When I click the little connect-to-bluetooth button in AddressBook, I am first asked to pair the phone - even though it's already paired, and connects automatically on both the computer and the phone. Then, when I do enter the code on the phone, the connection just fails. The button gets a slight blue outline but the B symbol doesn't actually light up as it should.
    Send SMS remains grayed out.
    Has anybody got this to work or know what could be wrong?
    PS: I am able to send SMS on Windows using MS SMS Sender, so I am sure that it's not the phone's fault.
    This worked fine with my Titanium Powerbook with USB Bluetooth dongle.

    Thanks for the response, but that's not it. The N73 is listed as supported, and iSync works perfectly well. Dial-Up networking also works perfectly well.
    Only sending SMS via bluetooth doesn't work.
    Also - no idea if this is related - faxing via the 6600 doesn't work anymore, which is strange because it used to work on the TiBook. Most people don't even know you can fax via Bluetooth phone and most newer phones have lost this capability so I guess this is just on its way out. Too bad because it was pretty useful...

  • Problem in sending SMS via using java communication API

    I need to send SMS via my sony ericsson Z530i. It is connected to the com5 port of my system. I got the following code.
    import java.io.*;
    import java.util.BitSet;
    import javax.comm.*;
    import java.lang.*;
    public class SerialToGsm {
        InputStream in;
        OutputStream out;
        String lastIndexRead;
        String senderNum;
        String smsMsg;
        SerialToGsm(String porta) {
            try {
    //            CommPortIdentifier portId = CommPortIdentifier.getPortIdentifier("com5");
                CommPortIdentifier portId = CommPortIdentifier.getPortIdentifier(porta);
                SerialPort sp = (SerialPort)portId.open("Sms_GSM", 0);
                sp.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
                sp.setFlowControlMode(sp.FLOWCONTROL_NONE);
                in = sp.getInputStream();
                out = sp.getOutputStream();
                // modem reset
                sendAndRecv("+++AT", 30);       // delay for 20 sec/10
                sendAndRecv("AT&F", 30);
                sendAndRecv("ATE0", 30);        // echo off
                sendAndRecv("AT +CMEE=1", 30);  // verbose error messages
                sendAndRecv("AT+CMGF=0", 70);   // set pdu mode
    //            sendAndRecv("AT V1E0S0=0&D2&C1", 1000000);
            catch (Exception e) {
                System.out.println("Exception " + e);
             System.exit(1);
        private String sendAndRecv(String s, int timeout) {
            try {
                // clean serial port input buffer
                in.skip(in.available());
                System.out.println("=> " + s);
                s = s + "\r";         // add CR
                out.write(s.getBytes());
                out.flush();           
                String strIn = new String();
                for (int i = 0; i < timeout; i++){
                    int numChars = in.available();
                    if (numChars > 0) {
                        byte[] bb = new byte[numChars];
                        in.read(bb,0,numChars);
                        strIn += new String(bb);
                    // start exit conditions
                    if (strIn.indexOf(">\r\n") != -1) {
                        break;
                    if (strIn.indexOf("OK\r\n") != -1){
                        break;
                    if (strIn.indexOf("ERROR") != -1) { // if find 'error' wait for CR+LF
                        if (strIn.indexOf("\r\n",strIn.indexOf("ERROR") + 1) != -1) {
                            break;                                            
              Thread.sleep(100); // delay 1/10 sec
                System.out.println("<= " + strIn);
                if (strIn.length() == 0) {
                    return "ERROR: len 0";
                return strIn;
            catch (Exception e) {                 
                System.out.println("send e recv Exception " + e);
                return "ERROR: send e recv Exception";
        public String sendSms (String numToSend, String whatToSend) {
            ComputeSmsData sms = new ComputeSmsData();
            sms.setAsciiTxt(whatToSend);
            sms.setTelNum(numToSend);
    //        sms.setSMSCTelNum("+393359609600");  // SC fixed
            String s = new String();
            s = sendAndRecv("AT+CMGS=" + (sms.getCompletePduData().length() / 2) + "\r", 30);
    //        System.out.println("==> AT+CMGS=" + (sms.getCompletePduData().length() / 2));
    //        System.out.println("<== " + s);
            if (s.indexOf(">") != -1) {
    //            s = sendAndRecv(sms.getSMSCPduData() + sms.getCompletePduData() + "\u001A"); // usefull one day?
    //            System.out.println("Inviero questo >>>> " + sms.getCompletePduData());
                   // if this sintax won't work try remove 00 prefix
                s = sendAndRecv("00" + sms.getCompletePduData() + "\u001A", 150);
    //            System.out.println("<== " + s);
                return s;
            else {
                return "ERROR";
        // used to reset message data
        private void resetGsmObj() {
            lastIndexRead = null;
            senderNum = null;
            smsMsg = null;
        public String checkSms (){
            String str = new String();
            String strGsm = new String();                         
            strGsm = sendAndRecv("AT+CMGL=0", 30);  // list unread msg and sign them as read
            // if answer contain ERROR then ERROR
            if (strGsm.indexOf("ERROR") != -1) {
                resetGsmObj();
                return strGsm; // error
            strGsm = sendAndRecv("AT+CMGL=1", 30);  // list read msg
            // if answer contain ERROR then ERROR
            if (strGsm.indexOf("ERROR") != -1) {
                resetGsmObj();
                return strGsm; // error
            // evaluate message index
            if (strGsm.indexOf(':') <= 0) {
                resetGsmObj();
                return ("ERROR unexpected answer");
            str = strGsm.substring(strGsm.indexOf(':') + 1,strGsm.indexOf(','));
            str = str.trim(); // remove white spaces
    //        System.out.println("Index: " + str);
            lastIndexRead = str;
            // find message string
            // look for start point (search \r, then skip \n, add and one more for right char
            int startPoint = strGsm.indexOf("\r",(strGsm.indexOf(":") + 1)) + 2;
            int endPoint = strGsm.indexOf("\r",startPoint + 1);
            if (endPoint == -1) {
                // only one message
                endPoint = strGsm.length();
            // extract string
            str = strGsm.substring(startPoint, endPoint);
            System.out.println("String to be decoded :" + str);
            ComputeSmsData sms = new ComputeSmsData();
            sms.setRcvdPdu(str);
    //        SMSCNum = new String(sms.getRcvdPduSMSC());
            senderNum = new String(sms.getRcvdSenderNumber());
            smsMsg = new String(sms.getRcvdPduTxt());
            System.out.println("SMSC number:   " + sms.getRcvdPduSMSC());
            System.out.println("Sender number: " + sms.getRcvdSenderNumber());
            System.out.println("Message: " + sms.getRcvdPduTxt());
            return "OK";
        public String readSmsSender() {
            return senderNum;
        public String readSms() {
            return smsMsg;
        public String delSms() {  
            if (lastIndexRead != "") {               
                return sendAndRecv("AT+CMGD=" + lastIndexRead, 30);
            return ("ERROR");
    }When i compile, there is no error. But when i execute it, the following error comes:
    E:\java\JavaSmsApi>javac SerialToGsm.java
    E:\java\JavaSmsApi>java SerialToGsm
    Exception in thread "main" java.lang.NoSuchMethodError: main
    What might be the error? Somebody help me. Thanks in advance.

    You are probably trying to run this as a CLDC application instead of a MIDP application (aka a MIDLet). Since CLDC apps start with a main(....) your runtime looks for one but does not find it, hence the error. Please recheck the project configuration.

  • Java application to send an SMS via my DKU-5 serial cable.

    Hi,
    I'm not sure if this is the right forum but....
    I'm doing a project for college which involves Learning Content Managemnt System.
    I've developed a few features for this including chat, forums, etc.
    I want to develop an SMS system to use in conjunction with the chat application
    ie. If a user is not online then the chat message will be sent to their mobile in the form of an SMS.
    Looking for help in creating a Java application to send an SMS via my DKU-5 serial cable.
    Any ideas??
    Thanks
    Message was edited by:
    kiwicas

    hiii u can try.........javax.comm package.
    its best for serial communication.
    contect [email protected] if required
    jigar

  • Best app for send sms via email?

    Anyone got any idea what the best app is to download to send sms via email?
    I downloaded text-free yesterday, but doesnt work and the message keeps bouncing back to my email in box as a failed mail delivery!!
    I am in the UK in case that makes a difference!!

    If you want to text people for free, i highly recommened AIM application. Its an IM app built in with an feature that allows you to text anyone on your contacts for free. Just let them know that its you texting them the first time.

  • SMS via iChatav?

    Hi,
    Is there any app/plugin which will send sms via ichat to UK mobile phones? I know it's possible to do that in US. Or perhaps some handy widget which will do that instead?
    Thanks
    Peter

    It only works if your Location set in the International Settings is set for the States and the Phone is also in the States.
    I know of someone who sets it this way in the Far East to contact people in the States.
    It does not work if your computer is set to another country or the phone is not one registered in the States.
    10:02 PM Tuesday; March 9, 2010
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • Is there any way to send sms through j2me

    hi all,
    is there any way to send sms through j2me or any way to communicate with real device through emulator or from emulator to another emulator
    any sugesstions appriciated
    abdul rafiq jani
    applitech solution limted

    what special API where i can get it any link or information about that APi
    regards
    abdul rafiq jani
    Applitech Solution Limited

  • Send SMS from J2ME application to a mobile number...

    Hi guys,
    Need your help on sending SMS from J2ME application saved from mobile to send to another mobile number...
    I have tried the WMA demo from suns WTK it send message but the other number cannot received the message.
    Please help or give any idea or sample code that can guide
    me...
    Thanks in Advance...
    Regards,
    Psyeu

    WMADemo works fine.
    Try to do this:
    1. Open WMADemo
    2. Run WMA Console (File->Utilites->WMA Console)
    3. On the top of the window of WMA Console you will see the number of "Console's phone". If you don't have any started emulators, the number will be +5550000.
    4. Run WMADemo
    5. Select SMS Send in emulator menu.
    6. In destination address write +5550000
    7. Enter message
    8. Push "Send" command. Emulator asks you to send SMS. Push "OK" twise.
    9. Then you will see your message in WMA Console

  • Impossible to send SMS through J2ME with a HTC which OS is Windows Mobile

    Hello,
    I've developed a J2ME application with possibilty to send a SMS.
    This works fine on some mobiles like Nokia 6300, but doesn't work on a HTC equipped with Windows Mobile.
    Precisely, in the case of my HTC, the variable supportedSms below is allways null.
    Can someone tell me how to solve this matter please?
                String supportedSms = System.getProperty("wireless.messaging.sms.smsc"); 
                if(supportedSms == null){
                        //this means the mobile can't send a sms through j2me code
                }else{
                        //this means the mobile can send a sms through j2me code
                }Regards

    Sorry, for digging up this topic, but has anybody found a solution to the problem? My sms sending application seems to work on SE's, Nokias, Motorolas etc. but not on Windows Mobile. I am testing it on a HTC s710 with Windows Mobile v. 6.0.
    Regards
    Martin

  • How can I send & recieve SMS via Mac ?

    How can I send & recieve SMS via Mac ?
    Handoff is already working fine between my iPhone 5 & Mac, I want to know how I can send & recieve SMS using my MAC

    Thank you so much
    I have another problem please:
    Handoff is working perfectly between my iPhone 5 & my Macbook pro, I also can receive calls on my mac and iPhone 5 at the same time, but when I try to make calls from my laptop it says that message:
    I am already using the same account for both of them

  • How send/receive sms in j2me

    Hi Friends,
    I am very new to J2ME.I need source code for sending/receiving sms with J2ME as application.
    Can you give the guidence.
    Thanking you.
    Cheers,
    Sateesh

    yea google is ur friend. also try and get the documentations from jcp.org
    what you need is JSR 205

  • Is there *any* way to ping MIDlet using default SMS/call (j2me)

    Hi,
    I'm writing a server style MIDlet which is polling a bluetooth device, the nature of the server is such that the phone running the MIDlet (in my case, a Motorola L6) is dedicated, it needs do nothing other than run the server, it is assumed it will not be used for anything else. Specifically the only phone calls or SMS messages it receives should be specific ping requests to server. The server will run 24/7, and should be resistant to being suspended by incoming calls (I've noted this could be a problem in itself).
    All I really want is for a 3rd party, without any special client software, to be able to ping the server (prompt it) to dispatch a set of text data to a pre-defined phone number via SMS (using WMA TextMessage).
    Basically someone should be able to set up the server, and then, with any phone (with no specific client MIDlet installed), be able to call or SMS the server and get a response posted back (to a fixed number, not necessarily to originating phone number).
    Does anyone know any way, no matter how hacky (needn't be pretty), to achieve this? You cannot receive SMS notifications on default port. An incoming call will call pauseApp which I could use - but not resume it, so server remains suspended. There are ways around having app suspended on receipt of call/SMS, but they involve never receiving the pauseApp notification, so I'm back to square one. I've wondered if I could check the free disk space on the MIDP profile (somehow) to 'detect' when it reduces in size, thus suggesting an SMS must have come in. Can a user send an SMS to a specific port with standard SMS-send interface (certainly can't see how myself, as no ':' character available). Can you hack the phone to re-route incoming SMS messages to something other than the default port?
    Is there a specific phone that might do this (I just need a phone supporting j2me bluetooth API, needn't be motorola L6)?.
    I think this can be done with Symbian (of which I know very little), and ultimately I might need to start programming with that, but I'd really prefer to continue using j2me..
    Any ideas would be greatly appreciated, I've spent a fair bit of time trolling for answers with only limited success.
    Cheers
    Edited by: bbloff on Oct 10, 2007 8:50 PM

    The tunnel default gateway is needed to let the internal firewall and router handle the routing for all decrypted IPsec packets. Today, after a Cisco IOS? EasyVPN Client connects to a Cisco IOS EasyVPN Server, there is no simple way for the client to send the tunnel traffic to the internal corporate network (other than to have the entire routing table on the IPsec gateway). In this type of implementation, the Cisco IOS routers use the default gateway to route all packets toward the Internet that do not have a more specific route. The tunnel default gateway gives customers the flexibility to control how they handle IPsec tunneled traffic

  • Sending an SMS via adress book and my Phone

    I have an SE K800i, How do I send SMS and Call via address book and my phone when it is connected via blutooth ?
    I know it can be done but I don't know how to do it.
    Many Thanks

    Hi,
    I recently picked up the same phone, ie the Sony Eric K800i and have been trying to get the 'send sms message' through the address book. I know this works 'cos i had a previous sony ericsson model and it worked fine but with this unit it doesn't seem to push it through.
    Where am i going wrong?....... I've set my device up with the Bluetooth *** and paired it and clicked on the button in the top corner of the address book ........ but to no avail,...... can anyone help.
    Thanks
    Robert

Maybe you are looking for

  • I need a simple answer in how to download new IOS to my IPAD that is one of the first versions

    I don't know if this is in the right discussion but I cannot find a simple answer as to how I can update my IOS on my ipad...any help is appreciated.

  • Job Log File

    Hello, I am a beginning in SAP, how to find the cause of an error in the job, is there some job log file? Thanks.

  • Applications won't open, trying to reinstall OSX

    I have a G5 iMac and I installed Leopard about a month ago and have installed the 10.5.2 update. The only software I have installed on the computer is iWork '08 and the Adobe Creative Suite 3 Master Collection (both of which were purchased legally.)

  • MVC - Select-Options

    Hello All,       I'm  creating an application with MVC model.Now I want a selection-screen page with select-options . but where to create these select-option fields and how to link them within my view ? Regards, Deepu.K

  • Generic RFC function modules

    Hello, assume you have a Web AS and a mySAP ERP-system which are connected to each other. On the ERP system there's a table "A" and you need parts/columns of the table on the Web AS, furthermore "A" could not be known on the Web AS. Is there a way to