×

Discussion Board

Results 1 to 15 of 24

Hybrid View

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    27

    How to read SMS from inbox in j2me

    Hello All,
    I am developing application that required to read text sms from phone.
    so,
    can we read sms in j2me?
    which api used for that in j2me?

    please reply in this regard.

    Thanx in advance,

    Mahesh
    J2me Developer

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: How to read SMS from inbox in j2me

    You cannot read SMS from the normal inbox in Java ME as far as I know. You can send SMS messages and receive messages sent to a specific port (which your MIDlet is listening to), but you cannot intercept the regular SMS messages.

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: How to read SMS from inbox in j2me

    Quote Originally Posted by bfchaudharimca View Post
    Hello All,
    I am developing application that required to read text sms from phone.
    Hi,
    Are you talking about to read the message that resides in inbox..yeah..unfortunately thats not possible at all in J2ME.

    For the same you can do in symbian C++;

    Yeah there is one way through which you can read the sms..is that just send the sms on the defined port ..the just catch it..
    if you need this then follow the code -
    public void startReceiving(String portDest, SMSCanvas canvas)
    {
    System.out.println("port is == "+portDest);
    smsCanvas = canvas;
    String smsConnection = "sms://:" + portDest;
    System.out.println("url sms "+smsConnection);
    if (smsconn == null)
    {
    try
    {
    smsconn = (MessageConnection) Connector.open(smsConnection);
    smsconn.setMessageListener(this);
    }
    catch (IOException ioe)
    {
    ioe.printStackTrace();
    }
    }
    thread = new Thread(this);
    thread.start();
    }
    static String string = null;

    public void run()
    {
    try
    {
    msg = smsconn.receive();

    if (msg != null)
    {
    if (msg instanceof TextMessage)
    {
    System.out.println("SmsReceive.run()" + ((TextMessage) msg).getPayloadText());
    string = ((TextMessage) msg).getPayloadText();

    }
    else
    {
    byte[] data = ((BinaryMessage) msg).getPayloadData();
    string = new String(data);
    System.out.println("SmsReceive.run()" + new String(data));
    }
    if(smsCanvas.isAskiingForRoutesSMS)
    ParseData(string);
    else if(smsCanvas.isAskiingForTicketSMS && !smsCanvas.isAskiingForRoutesSMS)
    {
    /*
    Form fm = new Form("");
    fm.append(string);
    smsCanvas.smsMidlet.display.setCurrent(fm);
    smsCanvas.appThread=null;
    smsCanvas.isAppRunning = false;
    */
    ParseData(string);
    }
    else if(smsCanvas.isAskiingForRechargeSMS)
    {
    smsCanvas.appState = smsCanvas.RECHARGED_SUCCESS_ERROR_SMS;
    smsCanvas.isAskiingForRechargeSMS = false;
    }
    smsconn.close();
    smsconn=null;
    }
    }
    catch (IOException e)
    {
    System.out.println("Exception caught .."+e.toString());
    }
    }
    public void notifyIncomingMessage(MessageConnection arg0)
    {
    // TODO Auto-generated method stub
    if (thread == null)
    {
    thread = new Thread(this);
    thread.start();
    }
    }

    Hope these lines can help you,
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Regular Contributor
    Join Date
    Sep 2008
    Location
    Ahmedabad
    Posts
    254

    Re: How to read SMS from inbox in j2me

    Hi,

    If the SMS sending application is also on your side then you can develop two applications one for sending and one for receiving. Otherwise inbox messages cannot be read in j2me.
    Sunil
    Mobile Application Developer

  5. #5
    Registered User
    Join Date
    Jan 2010
    Posts
    9

    Re: How to read SMS from inbox in j2me

    hello sir,
    i waant to implement steganography in mobiles...is this is possible with J2ME..??
    Is this stuff has got anything to do with the file system of our moiles..i.e is it possible to access the msgs from the inbox by using the file system of the mobiles..kindly sir help me..i need it..i hav to complete my project on this..
    lookinf for your reply..
    u can also reply me at nirucool89@gmail.com
    plzzzzzz reply

  6. #6
    Registered User
    Join Date
    Jan 2010
    Posts
    9

    Re: How to read SMS from inbox in j2me

    Sir,plzz reply asap..!!

  7. #7
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: How to read SMS from inbox in j2me

    You cannot access messages stored in/by the phone's Messaging app via the file system using J2ME.

  8. #8
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    208

    Unhappy Re: How to read SMS from inbox in j2me

    There is no way to access the native SMS inbox.

  9. #9
    Registered User
    Join Date
    Jan 2010
    Posts
    9

    Re: How to read SMS from inbox in j2me

    Quote Originally Posted by petrib View Post
    You cannot access messages stored in/by the phone's Messaging app via the file system using J2ME.
    how to access INBOX of mobile in J2ME.
    and is it possible to acess INBOX via any language i mean any mobile application implementation language? such as SYMBIAN C++ ??

Similar Threads

  1. How to fake a normal SMS to inbox?
    By luandao2000 in forum Symbian Networking & Messaging (Closed)
    Replies: 7
    Last Post: 2011-04-23, 08:26
  2. Can I Read the SMS list using a J2ME program
    By arspeiser in forum Mobile Java General
    Replies: 6
    Last Post: 2010-08-31, 12:02
  3. Replies: 2
    Last Post: 2007-04-17, 12:00
  4. reading sms from inbox in j2me
    By prashanthy2001 in forum General Messaging
    Replies: 3
    Last Post: 2006-12-24, 23:52

Posting Permissions

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