Skip to main content

Demo and i600 running IBM emulator

11 replies [Last post]
nic_r
Offline
Joined: 2008-07-11

Hi,

Since the Samsung i600 doesn't come with a KVM, I've downloaded the IBM MIDP 2.0 emulator, version 2.3. After reading about LWUIT I downloaded the demo to my phone, and it seemed to work moreless correctly.

However, if you choose one of the icons from the main screen and go to animations say (note that the text doesn't appear next to the icons) there are a few problems. For example, in the themes page the text is not displayed next to the radio buttons until you select a theme, and then the theme is not displayed correctly (eg. fish theme is only displayed across about a third of the screen).

Also the soft buttons do not work - the text is displayed 'above' where it is supposed to be, and pushing the buttons does not work - meaning you have to kill the application !

Don't think anyone has posted anything to this effect - keep up the good work !

Nic

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Patrick Julien

There yo go, a Netbeans project containing a BB/LWUIT sample. Tested and
works on real hardware, namely the Pearl and Curve

Things you should know.
1. Follow the guide here (http://www.netbeans.org/kb/55/blackberry.html) to
setup Blackberry in netbeans.
- in step 4 of this guide, replace 4.1.0 with 4.2.0, since this is
what I used. If you want to use something else, you'll have to edit
build.xml
- in step 6 of this guide, put 8100, again if and only if using 4.2.0
- build.xml in the project is already correct unless you're not using
version 4.2.0 of the JDE

2. If you're on vista, you'll have to grant yourself write access to the JDE
directory under "Program Files" since applications are copied to the
directory holding the emulator proper
3. You're kidding yourself if you think this is production quality code
4. You'll need to create a library called LWUIT under tools -> Libraries in
Netbeans
5. You need to remove the Transition3D and m3g classes from the LWUIT jar
6. This is using the ugly hack discussed yesterday in the TextArea thread.
7. Brought to you courtesy of spectrum (http://www.spectrumdt.com)

On Fri, Jul 11, 2008 at 8:21 AM, wrote:

> Hi,
>
> Since the Samsung i600 doesn't come with a KVM, I've downloaded the IBM
> MIDP 2.0 emulator, version 2.3. After reading about LWUIT I downloaded the
> demo to my phone, and it seemed to work moreless correctly.
>
> However, if you choose one of the icons from the main screen and go to
> animations say (note that the text doesn't appear next to the icons) there
> are a few problems. For example, in the themes page the text is not
> displayed next to the radio buttons until you select a theme, and then the
> theme is not displayed correctly (eg. fish theme is only displayed across
> about a third of the screen).
>
> Also the soft buttons do not work - the text is displayed 'above' where it
> is supposed to be, and pushing the buttons does not work - meaning you have
> to kill the application !
>
> Don't think anyone has posted anything to this effect - keep up the good
> work !
>
> Nic
> [Message sent by forum member 'nic_r' (nic_r)]
>
> http://forums.java.net/jive/thread.jspa?messageID=285935
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]
[MobileApplication1.zip]
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Patrick Julien

sorry wrong, thread

On Fri, Jul 11, 2008 at 9:39 AM, Patrick Julien
wrote:

> There yo go, a Netbeans project containing a BB/LWUIT sample. Tested and
> works on real hardware, namely the Pearl and Curve
>
> Things you should know.
> 1. Follow the guide here (http://www.netbeans.org/kb/55/blackberry.html)
> to setup Blackberry in netbeans.
> - in step 4 of this guide, replace 4.1.0 with 4.2.0, since this is
> what I used. If you want to use something else, you'll have to edit
> build.xml
> - in step 6 of this guide, put 8100, again if and only if using
> 4.2.0
> - build.xml in the project is already correct unless you're not
> using version 4.2.0 of the JDE
>
> 2. If you're on vista, you'll have to grant yourself write access to the
> JDE directory under "Program Files" since applications are copied to the
> directory holding the emulator proper
> 3. You're kidding yourself if you think this is production quality code
> 4. You'll need to create a library called LWUIT under tools -> Libraries in
> Netbeans
> 5. You need to remove the Transition3D and m3g classes from the LWUIT jar
> 6. This is using the ugly hack discussed yesterday in the TextArea thread.
> 7. Brought to you courtesy of spectrum (http://www.spectrumdt.com)
>
>
>
>
>
> On Fri, Jul 11, 2008 at 8:21 AM,
> wrote:
>
>> Hi,
>>
>> Since the Samsung i600 doesn't come with a KVM, I've downloaded the IBM
>> MIDP 2.0 emulator, version 2.3. After reading about LWUIT I downloaded the
>> demo to my phone, and it seemed to work moreless correctly.
>>
>> However, if you choose one of the icons from the main screen and go to
>> animations say (note that the text doesn't appear next to the icons) there
>> are a few problems. For example, in the themes page the text is not
>> displayed next to the radio buttons until you select a theme, and then the
>> theme is not displayed correctly (eg. fish theme is only displayed across
>> about a third of the screen).
>>
>> Also the soft buttons do not work - the text is displayed 'above' where it
>> is supposed to be, and pushing the buttons does not work - meaning you have
>> to kill the application !
>>
>> Don't think anyone has posted anything to this effect - keep up the good
>> work !
>>
>> Nic
>> [Message sent by forum member 'nic_r' (nic_r)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=285935
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
>> For additional commands, e-mail: users-help@lwuit.dev.java.net
>>
>>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

nic_r
Offline
Joined: 2008-07-11

[Reposted at the bottom, in case it got lost - previous two posts by Patrick were nothing to do with this thread !]

Hi Shai,

Finally got round to downloading the phoneME prebuilt code from Davy's site, and after a bit of playing around I got it to run my application. However, softkeys still don't work. All the navigation and fire buttons work correctly, it's just the softkeys that don't.

Printing out the key codes of the buttons didn't work either - the two buttons that are usually used for soft keys didn't produce any key codes - any idea why this might be ?

So I switched to plan B - use q and p for softkeys by modifying behaviour in the jad. Got 81 and 80 for q and p respectively, so put:

SoftKey-Left: 81
SoftKey-Right: 80

in the jad file. Still doesn't work.

Do you have any suggestions for either problem (or both ideally !) ?

Thanks,

Nic

Shai Almog

Hi Nic,
are you getting a keyPress/Released with 81/80 keycodes when using q/p?

If not then this might be a question best pointed to the appropriate
PhoneME forum around here. I also noticed there is a newer PhoneME
version out there so this might fix things such as this.

If you are getting the key codes for p and q yet still don't get the
behavior of the softkeys then this is something to investigate.

> [Reposted at the bottom, in case it got lost - previous two posts
> by Patrick were nothing to do with this thread !]
>
> Hi Shai,
>
> Finally got round to downloading the phoneME prebuilt code from
> Davy's site, and after a bit of playing around I got it to run my
> application. However, softkeys still don't work. All the navigation
> and fire buttons work correctly, it's just the softkeys that don't.
>
> Printing out the key codes of the buttons didn't work either - the
> two buttons that are usually used for soft keys didn't produce any
> key codes - any idea why this might be ?
>
> So I switched to plan B - use q and p for softkeys by modifying
> behaviour in the jad. Got 81 and 80 for q and p respectively, so put:
>
> SoftKey-Left: 81
> SoftKey-Right: 80
>
> in the jad file. Still doesn't work.
>
> Do you have any suggestions for either problem (or both ideally !) ?
>
> Thanks,
>
> Nic
> [Message sent by forum member 'nic_r' (nic_r)]
>
> http://forums.java.net/jive/thread.jspa?messageID=295857
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]

nic_r
Offline
Joined: 2008-07-11

Hi Shai,

I got the key codes by overriding the keyReleased method and displaying them, whilst running an LWUIT midlet on the phoneME KVM, on the phone itself.

I guess I could override the method in my proper application, ie. not use the JAD modifications, to see if that works....or maybe using setSoftKeycodes would be easier ?

Nic

Shai Almog

Hi Nic,
> I got the key codes by overriding the keyReleased method and
> displaying them, whilst running an LWUIT midlet on the phoneME KVM,
> on the phone itself.
>
> I guess I could override the method in my proper application, ie.
> not use the JAD modifications, to see if that works....or maybe
> using setSoftKeycodes would be easier ?

I think this would be a good idea, maybe there is an issue with the
jad loading?

>
> Nic
> [Message sent by forum member 'nic_r' (nic_r)]
>
> http://forums.java.net/jive/thread.jspa?messageID=295866
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]

nic_r
Offline
Joined: 2008-07-11

Shai,

Hardcoding the softkeys with setSoftKeycodes(81, 80, 0, 0) works fine, though obviously I don't want to leave that in there !

Using 'getAppProperty("SoftKey-Left") also works, so it looks like there is a problem when you read the JAD ?

Cheers,

Nic

nic_r
Offline
Joined: 2008-07-11

I take it back - reading the jad with getAppProperty works on the emulator, but not on the real phone. Maybe phoneME has a problem with jads....

Nic

Shai Almog

That might be a deployment issue on the device, I think the PhoneME
forum might know something here.

> I take it back - reading the jad with getAppProperty works on the
> emulator, but not on the real phone. Maybe phoneME has a problem
> with jads....
>
> Nic
> [Message sent by forum member 'nic_r' (nic_r)]
>
> http://forums.java.net/jive/thread.jspa?messageID=295878
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]

Shai Almog

Hi Nic,
we've had some issues with IBM's VM in the past, there is an
alternative for that VM in the form of PhoneME for Windows Mobile
discussed in this thread:
http://forums.java.net/jive/thread.jspa?messageID=285350

> However, if you choose one of the icons from the main screen and go
> to animations say (note that the text doesn't appear next to the
> icons) there are a few problems. For example, in the themes page
> the text is not displayed next to the radio buttons until you
> select a theme, and then the theme is not displayed correctly (eg.
> fish theme is only displayed across about a third of the screen).

This is an issue with the IBM flushGraphics() implementation which we
ran into in some other tests.

>
> Also the soft buttons do not work - the text is displayed 'above'
> where it is supposed to be, and pushing the buttons does not work -
> meaning you have to kill the application !

This is because we don't properly detect the IBM VM, you can manually
specify softkey codes in the jad file to solve this as explained in
this thread:
http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0

Thanks,
Shai.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

nic_r
Offline
Joined: 2008-07-11

Hi Shai,

Finally got round to downloading the phoneME prebuilt code from Davy's site, and after a bit of playing around I got it to run my application. However, softkeys still don't work. All the navigation and fire buttons work correctly, it's just the softkeys that don't.

Printing out the key codes of the buttons didn't work either - the two buttons that are usually used for soft keys didn't produce any key codes - any idea why this might be ?

So I switched to plan B - use q and p for softkeys by modifying behaviour in the jad. Got 81 and 80 for q and p respectively, so put:

SoftKey-Left: 81
SoftKey-Right: 80

in the jad file. Still doesn't work.

Do you have any suggestions for either problem (or both ideally !) ?

Thanks,

Nic