-2

can this code in the following link
http://j2mesamples.blogspot.in/2009/03/start-application-using-pushregistry.html
be converted to LWUIT format?

Because I created a sender application in LWUIT format, and now, I don't want the receiver to be in LCDUI. And one more thing I need to admit, I am totally new to mobile app development, LWUIT found to be very impressive so, I went with it.

What I have tried for converting that code in the link above:
changed .setString to .addComponent(new Label("")) and "alert" to "dialog"
but "Displayable resumeScreen;" seems give me problems, I never used this in lwuit, what I used to do was display.init(this); in the place of the display.setcurrent(alarm);

Can someone please help me to convert the code completely to LWUIT?

gnat
  • 6,213
  • 108
  • 53
  • 73

1 Answers1

1

The resumeScreen is a variable that keeps the current form when pausing a MIDlet so it can be restored when resuming a MIDlet. You don't need it in LWUIT.

Generally I would avoid a literal port of a MIDP application since the flow of MIDP/LWUIT applications is rather different.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • thanks a lot for your reply, i tried removing the display variable and replacing it with "Display.init(this);" and compiled it, but installed the jar&jad on nokia says its invalid app and prompts me to delete.so, i have done something wrong, Hey, is there any sample receiving sms code? just like the link above for lcdui, PLEASE let me know.plz. –  Feb 29 '12 at 03:04
  • There are lots of reasons for invalid apps. E.g. you might have set the jad properties for features that aren't available on the phone e.g. MIDP 2.1 etc. – Shai Almog Feb 29 '12 at 14:43
  • it is in MIDP 2.0, still its the same, could you plz help me with a sample code for receiving msg... i am in a code or die situation. plz Help me! –  Feb 29 '12 at 18:16
  • There could be countless reasons why a MIDlet failed installation on a device. For Nokia it could be an invalid property in the jad such as MIDlet-Touch-Support. It can also mean that the jar file is broken, you need to review both the jad and the jar in a text editor/zip application to see they both correspond properly to each other. – Shai Almog Mar 04 '12 at 06:21