[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kvm-interest
Subject:    MIDP3 Wish List - Another wish
From:       Sean Ellis <SEllis () SUPERSCAPE ! COM>
Date:       2005-04-19 11:11:15
[Download RAW message or body]

All,

MIDlet life cycle should be tightly specified and enforced.

I have 3 different handsets here, and this is what happens on each of them
when an incoming call is detected:

Handset #1:

        Canvas.hideNotify
        MIDlet.pauseApp
                ----- handle call -----
        Canvas.showNotify
        MIDlet.startApp

This is odd, because I would expect the pairs of related calls to nest
properly. Still, this works with the code I had this morning.


Handset #2:

        Canvas.hideNotify
                ----- handle call -----
        Canvas.showNotify

No pause/start at all.


Handset #3:

        MIDlet.pauseApp
                ----- handle call -----
        MIDlet.startApp
        Canvas.hideNotify (Amazing. It seems the event queue wasn't
processed before the pause happened)
        Canvas.showNotify

On this handset, the hide/show notify calls appear to come from a different
thread. This leads to a race condition between the startApp and the
hideNotify, which I have to unpick by hand. This is just daft. The
pause/resume code in my application is now spread across
pauseApp/startApp/hideNotify/showNotify, with various flags defined for
different platform's behavior, because I cannot rely on a consistent
ordering of events, or even whether some events happen at all.

MIDP3 offers an ideal opportunity to tighten this up, so that a single piece
of code will work across all platforms.

(I have added this to the Wiki as well, under Quality Issues)

Sean Ellis
Product Development Manager, Superscape Ltd.
Tel: 01256 745745 Fax: 01256 745777 Web: www.superscape.com
Terms and conditions for e-mail usage: www.superscape.com/email

 ==========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST".  For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12">
<TITLE>MIDP3 Wish List - Another wish</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>All,</FONT>
</P>

<P><FONT SIZE=2>MIDlet life cycle should be tightly specified and enforced.</FONT>
</P>

<P><FONT SIZE=2>I have 3 different handsets here, and this is what happens on each of \
them when an incoming call is detected:</FONT> </P>

<P><FONT SIZE=2>Handset #1:</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>Canvas.hideNotify</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>MIDlet.pauseApp</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>----- handle call \
-----</FONT> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT \
SIZE=2>Canvas.showNotify</FONT> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT \
SIZE=2>MIDlet.startApp</FONT> </P>

<P><FONT SIZE=2>This is odd, because I would expect the pairs of related calls to \
nest properly. Still, this works with the code I had this morning.</FONT></P> <BR>

<P><FONT SIZE=2>Handset #2:</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>Canvas.hideNotify</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>----- handle call \
-----</FONT> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT \
SIZE=2>Canvas.showNotify</FONT> </P>

<P><FONT SIZE=2>No pause/start at all.</FONT>
</P>
<BR>

<P><FONT SIZE=2>Handset #3:</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>MIDlet.pauseApp</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>----- handle call \
-----</FONT> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT \
SIZE=2>MIDlet.startApp</FONT> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT \
SIZE=2>Canvas.hideNotify (Amazing. It seems the event queue wasn't processed before \
the pause happened)</FONT> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT \
SIZE=2>Canvas.showNotify</FONT> </P>

<P><FONT SIZE=2>On this handset, the hide/show notify calls appear to come from a \
different thread. This leads to a race condition between the startApp and the \
hideNotify, which I have to unpick by hand. This is just daft. The pause/resume code \
in my application is now spread across pauseApp/startApp/hideNotify/showNotify, with \
various flags defined for different platform's behavior, because I cannot rely on a \
consistent ordering of events, or even whether some events happen at all.</FONT></P>

<P><FONT SIZE=2>MIDP3 offers an ideal opportunity to tighten this up, so that a \
single piece of code will work across all platforms.</FONT> </P>

<P><FONT SIZE=2>(I have added this to the Wiki as well, under Quality Issues)</FONT>
</P>

<P><FONT SIZE=2>Sean Ellis </FONT>
<BR><FONT SIZE=2>Product Development Manager, Superscape Ltd. </FONT>
<BR><FONT SIZE=2>Tel: 01256 745745 Fax: 01256 745777 Web: www.superscape.com </FONT>
<BR><FONT SIZE=2>Terms and conditions for e-mail usage: \
www.superscape.com/email</FONT> </P>

</BODY>
</HTML>
===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST".  For general help, send email to
listserv@java.sun.com and include in the body of the message "help".



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic