×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  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
    Nokia Developer Moderator
    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
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    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++ ??

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

    Re: How to read SMS from inbox in j2me

    Quote Originally Posted by nirucool89 View Post
    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++ ??
    It is for sure in case of J2ME that it cannot be done. I'm not sure about Symbian.

  11. #11
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: How to read SMS from inbox in j2me

    Quote Originally Posted by nirucool89 View Post
    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++ ??
    As stated, you can not access the Inbox via Java (J2ME) apps on either Symbian/S60 or S40 based phones.

    But you can access the Inbox via C++ apps on Symbian/S60 based phones.

  12. #12
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: How to read SMS from inbox in j2me

    You can do it with a combination of Symbian background app and J2me front end also.

    I.e. just get small Symbian background app; which can read the SMS inbox of the device and keep on upadting a txt file at some place on the device from where the J2me app can read itusing JSR-75 FCA API.

    thanks,
    ~Amitabh

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

    Re: How to read SMS from inbox in j2me

    Hello sir,
    thnx a lot for your reply..
    But sir i am not having any background of symbian...i.e i don't know anything about symbian..i would be highly grateful if you could guide me on this matter...
    Will you plzz elaborate to what you are saying..??
    I am unable to get it..!!

    Thnx in advance
    Waiting for your reply
    Niranjan

  14. #14
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: How to read SMS from inbox in j2me

    Please refer to this article on FN wiki:
    http://wiki.forum.nokia.com/index.ph...an_Exe_(Server)

    You can use this codelet in symbian to provide you this feature to your J2me app; when this Symbian server app is runing in the background.

    OR you have use this codelet:
    http://wiki.forum.nokia.com/index.ph...SMS_from_Inbox
    to read SMS from inbox in Symbian

    And this one to write this data in file
    http://wiki.forum.nokia.com/index.ph..._writing_files

    IN j2me you can use JSR-75 FCA API to open the file you saved in Symbain and read it for your own use in J2me.

    thanks,
    ~Amitabh

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

    Re: How to read SMS from inbox in j2me

    Thnx sir for those links..bt sir can you give me some tutorials for symbian..i mean some references to start with symbian some basic buks...that clearly defines what this variable signinfies...i have done a lot of googling bt couldn't get...
    Plz give me sum references..for symbian
    Waitng 4 ur reply

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
  •