×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    8

    Receiving messages and process them into a database or txt file

    Hi, I wanted to know if you can help me to know how can I receive messages in j2me, in a previous api I'm sending a message to a phone with a port number as an identifier (5555), I want the other phone to receive the message (just the one with that identifier), take part of the message and save it into a database (the message are data separate with commas), I know that with RMS we could handle a database in j2me but I was thinking if it would be better to save the data on a txt file, pass it to a pc through nokia pc suite and process it with any other software in a data base, I don't know if it's possible, I've been looking for this information but I can't find what I need to do.

  2. #2
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: Receiving messages and process them into a database or txt file

    You can send and receive messages between phones with Wireless Messaging API, save as .txt file with FileConnection API.

    Please take a look at the relevant documentation sections of Forum Nokia web site to see code examples for both APIs.

    Daniel

  3. #3
    Registered User
    Join Date
    May 2007
    Posts
    8

    Re: Receiving messages and process them into a database or txt file

    Well, the thing is that I need to write a txt file for every incoming message with that port number as identifier, if I get 10 incoming messages I want to create 10 txt files for every one of them, how can I do this? I'm checking some examples for incoming messages but I still don't know how to take the information from the message, something with getPayloadData()? In that case what kind of variable could I use? String?

  4. #4
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: Receiving messages and process them into a database or txt file

    Hi,

    Cast the "Message" type to "TextMassage" and use:

    String s = textMessage.getPayloadText();

    Then proceed to create a new file with this content using FileConnection API.

    Daniel

Similar Threads

  1. Problems Sending and Receiving SMS Messages from the Emulator
    By appdeveloper in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2006-11-27, 05:15
  2. Replies: 0
    Last Post: 2002-11-19, 08:25

Posting Permissions

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