J2ME Messenger

I wanted to know whether it is possible to build such an application where Midlet(1) knows that Midlet(2) is online and can engage in either a network conversation like a chat room or an SMS chat. Some other issues are highlighted below:
1:
Is it then possible to detect n Midlets and then add them to the conversation. Would I need to make use of the push registry in MIDP 2.0
to make the program more aware. ?
2:
Can I compress the messages being sent across?
3:
Can I add SOAP & SSL security to the messaging system if done on ports?
4:
Is it possible to have simultaneous communications with the server during the chat session?
I have people on this forum claim things like this are possible but am no quite sure how to get going on a development of this.
What do I need to get started apart from J2SE and WTK 2.0. I know about the JSRs but where do I get hold of the other APIs
Thanks for any comments
Prash

I wanted to know whether it is possible to build such
an application where Midlet(1) knows that Midlet(2) is
online and can engage in either a network conversation
like a chat room or an SMS chat. Some other issues are
highlighted below:Yes this is possible,
>
1:
Is it then possible to detect n Midlets and then add
them to the conversation. Would I need to make use of
the push registry in MIDP 2.0
to make the program more aware. ?
2:
Can I compress the messages being sent across?
3:
Can I add SOAP & SSL security to the messaging system
if done on ports?
MIDP 2.0 has support for secure sockets and HTTPS
4:
Is it possible to have simultaneous communications
with the server during the chat session?I havent used the MIDP 2.0 sockets yet, however its
reasonable to assume that one should be able to open
more than one simultaneously.
>
>
I have people on this forum claim things like this are
possible but am no quite sure how to get going on a
development of this.
As far as the APIs are concerned I think it can be done
with MIDP 2.0 (although few phones support this now, but
next year there will be a lot of them probably).
However the issues to consider are .jar size, how much it
will cost to chat (via GPRS, you pay per byte, ok maybe
it is negligible but maybe not), memory requirements at
runtime, user interface friendliness, etc etc.
But overall, I thing this would be a cool project :)
C U
Dimitris

Similar Messages

  • Very Urgent help Required

    iam making a j2me messenger using msn server . the server communicates the protocol8(which)iam using currently.
    first i open the connection with the server using SocketConnection.
    the i open the InputStream and the OutputStream in a separate thread which is a simple java class called Threader the object of this class is called in the midlet now the first string that i must send is the version command i.e VER 0 MSNP8 CVR0\r\n.
    the server must reply back with the response VER 0 MSNP8 CVRO
    this problem is that when i run my midlet the Threader class that runs this authentication process doesnt get called at all it seems that the object doesnt get created that i created in the actionCommand() method please help and tell me what to do if u can correct the code than u r welcome but kindly hurry.
    * Tester.java
    * Created on July 10, 2006, 3:33 AM
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.microedition.io.Connector;
    import javax.microedition.io.SocketConnection;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    * @author Administrator
    * @version
    public class Tester extends MIDlet implements CommandListener{
    Command start;
    Form fmMain;
    Display ds;
    Threader th=new Threader();
    public Tester()
    ds=Display.getDisplay(this);
    start=new Command("Go",Command.SCREEN,1);
    fmMain=new Form("Geting Varified ");
    fmMain.addCommand(start);
    fmMain.setCommandListener(this);
    public void startApp() {
    ds.setCurrent(fmMain);
    public void pauseApp() {
    public void destroyApp(boolean unconditional) {
    public void commandAction(Command command, Displayable displayable) {
    if(command==start)
    th.start();
    class Threader implements Runnable {
    SocketConnection sc=null;
    InputStream in=null;
    OutputStream out=null;
    public void run() {
    try
    getVarified();
    catch(Exception e)
    System.out.println(e);
    public void start()
    try
    Thread thread=new Thread(this);
    catch(Exception e)
    System.out.println(e);
    private void getVarified() throws IOException{
    try
    String url = "socket://" +"messenger.hotmail.com"+ ":" +1863;
    sc = (SocketConnection) Connector.open(url);
    in = sc.openInputStream();
    out = sc.openOutputStream();
    out.flush();
    String str="VER 1 MSNP8 CVR0\r\n";
    out.write((str+ "\r\n").getBytes());
    out.flush();
    StringBuffer sb = new StringBuffer();
    int c = 0;
    while (((c = in.read()) != -1) ) {
    sb.append((char) c);
    System.out.println(sb.toString());
    catch(Exception e)
    System.out.println(e.toString());
    }

    I don't think you can rent Total Care anymore, if you can it is certainly not advertised or suggested. I know Business can pay extra for Total or other agreed levels of care but Business and Consumer are run completely independently from one another.
    Anyway, if the guy really is a Surgeon on call why has his Local NHS Primary Care Trust not registered him under their Total Care agreement with BT?
    Or perhaps it is really a case of, I need my line because I just simply can not function without phone or internet for two or three days so I will pretend I am something like a Surgeon in the hope BT and Openreach will drop everything and rush out to fix my line over the hundreds if not thousands of other people who called before me.
    In instances like this I always give the same advice, man up and get on with it.

  • Java IDE (JBuilder) cannot find J2ME's API and packages

    Hi,
    could anyone help me with this?
    I went to sun's java web site, and I downloaded and install the latest version of the wireless toolkit. I need to create a windows application that can send/receive MMS messenges, and hence the need for the J2ME's API and also WMA's API.
    However, even after I installed the wireless toolkit, my Java IDE (JBuilder 2005) cannot detect any packages like "javax.microedition.*" or "javax.wireless.*" etc etc
    Is there a place where I can download/purchase J2ME. Please be patient with me because I am a newbie in the world of J2ME... thanks :)

    When you configuring your project in JBuilder just add some jar (which you need) from wtk library in section "include"
    Project properties
    Paths
    Required libries
    and add here addition j2me libraries.

  • Building a simple J2ME chat client (for own J2SE-based server) Threading Qs

    Hi!
    I am making my own simple chat / messenger service to use between a couple of friends over GPRS.
    On the server side i have made a multi threaded TCP server that opens a new thread for each connecting client and stores these socket connections in a hashtable for access to send data between each thread.
    So when a client logs on to the server, the server sends a printwriter message to all other clients informing them of what client connected, and the clients can put the username in its out-database. then the clients can send messages to each others using a simple, self build protocol.
    All connection between clients/server happens over a simple printwriter on in/out streams.
    Problem is: it works perfectly most of the time.... However, sometimes a message is mysteriously lost when transferred from the server to a client. Transfer from client to server works flawlessly. I am thinking that it might have something to do with the client side threading, or slow network transfer casuing a TCP read error.
    Client structure is as following:
    start-> Midlet class -> (press connect to server) -> new Client class (impl runnable) -> new thread(this) -> void run() sets up all connections and writers, waits in a while loop for messages from server and takes action according to message type. -> Button(send) uses output stream to send a message to server.
    Do anyone have any suggestions on what I must consider when making a client that will simultaniously be able to listen for data from server as well as send data to server over 1 socket and slow mobile connection without causing any trouble?
    More info can be provided if necessary.
    Thank you!

    Building a simple J2ME chat client (for own J2SE-based server)a. i would like to say that this is a bl00dy brilliant idea. i mean ~ its been done before but building one yourself is quite thrilling.
    b. are u using java 4 or java 5. ?
    sometimes a message is mysteriously lost when transferred from the server to a client. Transfer from client to server works flawlessly.are you using push registry to recieve incoming connections.
    i recommend using a StreamConnectionNotifier connection instead of just a socket connection. you could send your data (xml/plain text) just like a stream (tcp ofcourse). if you want to know how to use a StreamConnectionNotifier connection, here's how
    try{
    // listen at local port 789
    StreamConnectionNotifier notify = (StreamConnectionNotifier) Connector.open(“http://:789”);
    // infinite loop to get incoming connections
    for(;;)
    StreamConnection stream = notify.acceptandOpen();  // return a stream connection when a connection is made
    InputStrean mystream = stream.openInputStream();
    while(mystream!=-1)
    mystream.read();
    ....cheers

  • Yahoo Messenger (Sprint Pre): No account button! only one Y! at a time?

    Hi,
    I have a Sprint Pre, and I have a Yahoo IM account set up in my Messaging application. Works great, tho sometimes it does take a long time to sign in or needs me to sign out then try signing back in for it to succeed in signing in.
    When I go to Accounts and Preferences, and go to the Add Account menu, I only see two buttons, one for adding a google account and one for adding an AIM account.
    I'm just checking: should I see an option to add a Yahoo IM account also? or does the fact that I already have one set up mean that I can't add another one, and the button not being there is a reflection of that?
    I'm a little nervous in case I ever had to delete the Yahoo IM account or if I ever have to re-setup the account. If I do, will that button be there again?

    Yahoo Messenger isn't natively supported on the Palm Pre/Pixi, and all signs point to it not ever happening. This is a known issue and has befuddled Palm users since the device came out. There is yet to be any work-arounds that I'm aware of.
    When you say "messaging application", what app are you using specifically?

  • Live cam voice & msn messenger

    I bought creative live cam voice and I cannot get it to work with WINDOWS LIVE MESSENGER as it always crashes and gives the error message "the program has stopped working". Im using vista 64 bit and all the latest drivers.
    I did get it working for a short while with MSN 7.5 but microsoft now prevent that version being used and when you try and install it windows insists on downloading live messenger instead.
    Help please

    HELLO CREATIVE!!!
    CAN YOU MAKE THIS CAMERA USEFUL?
    NEED NEW DRIVER!

  • Unable to get Live Cam Video IM pro to work with MS Messenger

    I have installed Live Cam IM Pro and all software from CD, plus updates. It works if I try Cam Manager ... I see myself in preview window.Looking in Start - settings - control panel - scanners & camera there is only one entry, the Live Cam pro. I cannot get it to work with Windows Live Messenger .... if I initiate a video call, it rings but when far end answers ... I get video window with ... video loading message, but it fails and I just get a standard XP icon. If I go to Messenger .. tools ..audio & video the camera sparks into life and again I see myself in preview.But when I go to tools .. webcam settings I see the error message :Cannot change camera settings because your camera is not plugged in or you are using it in a video conversation or with another programIt is obviously plugged in, and there are no other programmes running. I have tried deinstall & reinstall ... no difference. I have removed CD extras .. so now just have Cam Manager & Video driver ... but still no joy.Anybody know how to fix this ?
    Message Edited by Catherina-CL on 02-12-2007 08:39 AM

    Bump, fixed the post.
    Cat

  • Send email from j2me through servlet

    Hi people,
    i hope you can help me because i am new in network programming.
    I am trying to send email from j2me to googlemail account I have 2 classes EmailMidlet (which has been tested with wireless Toolkit 2.5.2 and it works) and the second class is the servlet-class named EmailServlet:
    when i call the EmailServlet, i get on the console:
    Server: 220 mx.google.com ESMTP g28sm19313024fkg.21
    Server: 250 mx.google.com at your service
    this is the code of my EmailServlet
    import java.io.*;
    import java.net.Socket;
    import java.net.UnknownHostException;
    import java.text.*;
    import java.util.Date;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class EmailServlet extends HttpServlet {
       public void doPost(HttpServletRequest request, HttpServletResponse response)
             throws IOException, ServletException {
          System.out.println("____emailservlet.doPost");
          response.setContentType("text/plain");
          PrintWriter out = response.getWriter();
          System.out.println("______________________________");
          out.println();
          String to = request.getParameter("to");
          System.out.println("____________________________to" + to);
          String subject = request.getParameter("subject");
          String msg = request.getParameter("msg");
          // construct an instance of EmailSender
          System.out.println("servlet_to" + to);
          send("[email protected]", to, subject, msg);
          out.println("mail sent....");
       public void send(String from, String to, String subject, String msg) {
          Socket smtpSocket = null;
          DataOutputStream os = null;
          DataInputStream is = null;
          try {
             smtpSocket = new Socket("smtp.googlemail.com", 25);
             os = new DataOutputStream(smtpSocket.getOutputStream());
             is = new DataInputStream(smtpSocket.getInputStream());
          } catch (UnknownHostException e) {
             System.err.println("Don't know about host: hostname");
          } catch (IOException e) {
             System.err
                   .println("Couldn't get I/O for the connection to: hostname");
          if (smtpSocket != null && os != null && is != null) {
             try {
                os.writeBytes("HELO there" + "\r\n");
                os.writeBytes("MAIL FROM: " + from + "\r\n");
                os.writeBytes("RCPT TO: " + to + "\r\n");
                os.writeBytes("DATA\r\n");
                os.writeBytes("Date: " + new Date() + "\r\n"); // stamp the msg
                                                    // with date
                os.writeBytes("From: " + from + "\r\n");
                os.writeBytes("To: " + to + "\r\n");
                os.writeBytes("Subject: " + subject + "\r\n");
                os.writeBytes(msg + "\r\n"); // message body
                os.writeBytes(".\r\n");
                os.writeBytes("QUIT\r\n");
                // debugging
                String responseLine;
                while ((responseLine = is.readLine()) != null) {
                   System.out.println("Server: " + responseLine);
                   if (responseLine.indexOf("delivery") != -1) {
                      break;
                os.close();
                is.close();
                smtpSocket.close();
             } catch (UnknownHostException e) {
                System.err.println("Trying to connect to unknown host: " + e);
             } catch (IOException e) {
                System.err.println("IOException: " + e);
       } 1.when i print "to" in EmailServlet also:
      String to = request.getParameter("to");
          System.out.println("____________________________to" + to);  it show null on the console :confused:
    2. ist this right in case of googlemail.com?
      smtpSocket = new Socket("smtp.googlemail.com", 25);  I would be very grateful if somebody can help me.

    jackofall
    Please don't post in old threads that are long dead. When you have a question, please start a topic of your own. Feel free to provide a link to an old thread if relevant.
    I'm locking this thread now.
    db

  • I can't not sign in in the messenger from my blackberry

    I can't not sign in in the windows  messenger from my blackberry and also from any blackberry. This message apears." Server encontered unrecoverable error. Please contact your system administrator." Also I sing in with other contact and got thru without problem. Can you help me please?

    there are no specific restrictions for windows ID's.. try to change your password & then try to login once again.. and by the way, what's the ID.. is the @live or @hotmail ??
    .RoCkInG dUdE.
    Trust Your Technolust | Do not PM for any support
    If a solution received, please hit on to show your support.

  • Songs don't show up in Windows Live Messenger after itunes 7.0.1 update

    The topic line pretty much says it all. I've checked the settings in Messenger. I'm not sure the songs are supposed to show up in Messenger from itunes, but they always have and I like that feature.
    Since updating itunes from 7.0 to 7.0.1 this feature doesn't work. I wonder why apple doesn't test their stuff before releasing it anymore. They're getting as bad as Microsoft anymore, which is a shame. I'm referring mainly to the larger problems with itunes 7 rather than my petty problem here.
    Any help would be appreciated though. Thanks.

    I had the same problem!!!!
    in windows live messenger (msn 8.0) go 2 tool>options & make sure the show song information from WINDOWS MEDIA PLAYER as a personal messeger box is ticked!
    then sign out of the messenger, close it & itunes, then open up windows live messenger, sign in, then open itunes @ start playing ur songs!
    this worked for me. hope it works for u.
    good luck!

  • Accidentally Moved Blackberry Messenger Into Wrong Folder - How Do I Move Back?

    Hi Guys, I accidentally moved Blackberry Messenger into the SMS and MMS Folder instead of just moving the icon around.
    Please advise how I move it out of this folder and back to the Home Screen?
    Thanks,
    PETER

    Scroll to the icon > press the Menu key > Move to Folder > and choose which one you would like it put in, Home Screen, if that is where you want it.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • J2me and java card, need help to communicate

    we are trying to put together a reader to read smartcards using j2me and we figure that it would be easiest if we could develop it to work with java cards rather than standard smart cards, the problem is we get garbage when we communicate to it, the chip sends us crap, any suggestions what might be wrong, any calls we might be missing, has anyone worked with j2me and java cards or smart cards, any help would be appreciated.
    einar

    .... reader app and the ME behind it .... smells like mobile ....
    First of all - if you want to have one mobile application running on this just make sure that whatever is written in ME can use drivers from the reader chip ....
    Workin on the PC is something completely different. There was one good example how to develop one host application in Java provided with the JCOP tools long ago ... I don't know if this is now in the new Eclipse tools.
    But - there was a small API provided that can give you good hints what to do - and - once you have it on the reader side - you can easily integrate ME methods with this ...

  • URGENT HELP REQUIRED FOR BLACKBERRY MESSENGER ON CURVE 8320

    Can anyone out there please help me.  I have two invitations to join Blackberry Messenger that tells me where to go and download the software.  When I try to download the 4.0 and 4.1 latest software, I get the error message that my phone is not able to do so.
    I also tried to download via the Internet and Iget the same error message, can anyone help as I am in love with my smartphone and my wife is jealous that I give the phone more attention than she ever got.
    Also can I type mails or send SMS through the Roxio desktop Interface?  I do that easily with my Nokia PC Suite but it seems impossible with my BlackBerry.
    Please help.
    ibk 

    Hi and welcome to the forums!
    There is no text option in Roxio media manager, it's sole function is to manage your media between PC and BB.
    Do you have a data services Package with your carrier, as well as a text package?
    Please let me know!
    There is no group I know of for a Blackberry widows club....but somebody ought to start one, my wife would be the first to join
    Click Accept as Solution for posts that have solved your issue(s)!
    Be sure to click Like! for those who have helped you.
    Install BlackBerry Protect it's a free application designed to help find your lost BlackBerry smartphone, and keep the information on it secure.

  • Image Processing in j2me

    Hi All,
    I want to do image processing in mobile application(j2me).
    But there are not enough java packages in mobile environment.
    How to do it please let me know if any body knows.
    Thanks.

    brightness: convert every RGB pixel to HSB -> increase luminance by constant value -> convert back to RGB
    contrast: convert every RGB pixel to HSB -> multiply luminance by constant value-> convert back to RGB
    You can also do both in one go.

  • UTF-8 encoding in J2ME

    Hello,
    I'm currently developing J2ME application for downloading bus schedules.
    The data that I download is in polish language (eg. bus directions, stop names etc). These are xml files generated by a php script encoded in UTF-8.
    The problem is that I don't know how to display that properly, so that all the polish characters are what they're supposed to be.
    Some of my code for downloading content:
    String getXML(String url)
            HttpConnection cn = null;
            InputStream str = null;
            //DataInputStream strd = null;
            StringBuffer sb = null;
            try
                int code;
                cn = (HttpConnection) Connector.open(url);
                code = cn.getResponseCode();
                if (code == HttpConnection.HTTP_OK)
                    str = cn.openInputStream();
                    // strd = new DataInputStream(str);
                    sb = new StringBuffer();
                    InputStreamReader r = new InputStreamReader(str, "UTF-8");
                    int total = 0;
                    int read = 0;
                    while ((read = r.read()) >= 0)
                        total++;
                        sb.append((char) read);
                    return sb.toString();
                else
                    throw new Exception("Nie udało się połączyć z serwerem");
            catch (Exception e)
                return null;
            finally
                try
                    if (str != null)
                        str.close();
                    if (cn != null)
                        cn.close();
                catch (Exception e)
        }And parsing it:
    InputStreamReader reader = null;
                    String xml = getScheduleXML(getSel_Line(), null, null);
                    ByteArrayInputStream stream = new ByteArrayInputStream(xml.getBytes());
                    reader = new InputStreamReader(stream, "UTF-8");
                    parser.setInput(reader);
                    while (parser.next() != KXmlParser.END_DOCUMENT)
                        if ((parser.getEventType() == KXmlParser.START_TAG) && (parser.getName().equalsIgnoreCase("direction")))
                                String d = (String) parser.getAttributeValue(0);
                                v.addElement(d);
                                String d2 = (String) parser.getAttributeValue(1);
                                v2.addElement(d2);
                    }What do I do wrong? What is missing?

    Problem solved. I had to add "UTF-8" parameter to getBytes method.

Maybe you are looking for

  • MSG 306 ERROR

    I am getting a MSG 306 ERROR. I think it is because one field is 30 Characters and other field is TEXT. Just guessing. Here is the code,  error message and DDL. Select SD.Sales_Order As [SO #] ,SD.SO_Line As [Ln]     ,Cast(Min(SD.Status)   As Varchar

  • Background sound play goes stop when click the power button on ios.

    On AIR 3.9 the background task execution issue has been solved but when we click the power button on ios devices the background sound play goes stop until we unlock the device. So Dear Adobe Please fix this issue .

  • Calendar Groups for Events

    I had in the past created two "categories" in Calendar: one for "Home" and one for "Work" ... I thought I recently created a new one called "School" - there seems to be a drop-down arrow in front of the colored box for "School" that does nothing. I'm

  • Function to update dependent characteristic in QP02

    Hello, Is there any function or BAPI which updates dependent characteristic in QP02. I looked for some BAPIs but those are called for QP01 not for QP02. I think this functionality is not possible through BDC also (Please correct if i am wrong). Any h

  • Does Anyone Know What Happened To The Feedback Form?

    I'm running low on disk space and feel like bugging Apple to fix Media Manager again. Thanks! Zap