Testing a WMA application using an emulator

L

lfine02

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top