Testing a WMA application using an emulator

Discussion in 'Java' started by lfine02@yahoo.com, Jan 20, 2005.

  1. Guest

    I'm a newbie to J2ME, but here is what I am trying to do. I have a
    small MIDlet (code below):

    public class HelloWorldMIDlet extends MIDlet implements MessageListener
    {
    private StringItem stringItem;
    private Display display;

    public HelloWorldMIDlet()
    {
    stringItem = new StringItem("Label:", "Hello World");
    }

    public void startApp()
    {
    }

    public void notifyIncomingMessage(MessageConnection conn)
    {
    try
    {
    TextMessage msg = (TextMessage) conn.receive();

    display = Display.getDisplay(this);
    Form form = new Form("Form 1");
    stringItem.setText(msg.getPayloadText());
    form.append(stringItem);
    display.setCurrent(form);
    }
    catch (Exception ex)
    {
    System.out.println("error");
    }
    }

    public void pauseApp()
    {
    }

    public void destroyApp(boolean unconditional)
    {
    }
    }

    As you can see, this is just a "tester" application I am using as a
    proof of concept. I used Eclipse 3.0 as my IDE. I have an item in the
    JAD for this:

    MIDlet-Push-1: sms://:200, HelloWorldMIDlet, *

    that should be used to update the PushRegistry as long as I load the
    application using OTA. I then want to open up the WMA utility in the
    WTK, and send an SMS message to the phone. Based on the code above, I
    should see text "pop up" on the phone with whatever string I send in
    the SMS message. OK, now, I have a bunch of questions on this, so here
    goes:

    1) You guys may think I need a lobotomy after this one, but I cannot
    figure out how to bring up a "blank" phone emulator with no MIDlet
    started. I would like to do this because from everything I have read,
    the SMS message should cause the MIDlet to load based on the
    MIDlet-Push-1 entry in my JAD. How do I do this???

    2) In Eclipse I cannot figure out how to "load the app OTA". The only
    options I see are to build the project or run the app.

    3) Since I couldn't figure out how to do (1), I went ahead and started
    the HelloWorldMIDlet in Eclipse, which brought up a phone (55500000),
    with a blank screen (since nothing is in the startApp event). I then
    opened up the WMA utility in the WTK, and sent a message over port 200
    to this phone - nada, nothing printed on the screen. This because I
    didn't load the app to the emulator OTA (which per #2, I can't figure
    out how to do).

    Thanks for your help in advance and sorry if any of these are brain
    dead questions.
     
    , Jan 20, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZGhucml2ZXJzaWRl?=

    wma / drm / music download theory help!

    =?Utf-8?B?ZGhucml2ZXJzaWRl?=, Mar 6, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    368
    Scott Allen
    Mar 6, 2005
  2. John Ryan

    Java WMA to MIDI Converter

    John Ryan, Aug 17, 2003, in forum: Java
    Replies:
    2
    Views:
    4,527
    Tommy88
    Oct 14, 2009
  3. den
    Replies:
    0
    Views:
    484
  4. stan k.
    Replies:
    1
    Views:
    556
  5. PiotreK

    using WMA control from C# code

    PiotreK, Feb 5, 2008, in forum: ASP .Net
    Replies:
    5
    Views:
    555
    Mark Rae [MVP]
    Feb 6, 2008
Loading...

Share This Page