View Single Post
Posts: 306 | Thanked: 603 times | Joined on Jan 2012 @ Belgium
#593
Originally Posted by Estel View Post
Firs results - it's really awesome, finally I'm able to use java program for paying public communication in my city. It was never ever damn possible with microemu.

Here comes small question - sorry if it was covered before, but I don't remember it nor search gave me any results:

In "dumb phones" with java support, there was an option to "ask everytime" if application is allowed to send/receive data (over gprs, for example). It was extremely useful for programs, that got stupid restriction - for example, mentioned public transport payment program was closing itself after ~30 seconds, as miserable way of "preventing" people from just sitting with program open and hitting "yes" to "buy ticket?" prompt, when ticket control arrive. To make things worse, next starting of application was delayed to ~3 min of starting time.

As result, due to slow gprs connection or whatsnot, many times it wasn't enough time to pay for ticket. But, thanks to "allow connection" prompt, one was able to "sit" at this prompt - application was kinda "paused" in meantime - time counter started to work again only after answering.

Is it possible to simulate such mechanism in phoneME?

/Estel

// Edit

Maybe just pausing midlet, when phoneME is not in focus, i.e. when browsing taskbar/doing other things on phone? It would be enough, I suppose, and could be usefull in many other cases as well (pausing java games when doing something else etc)

// Edit 2
Small glitch in .desktop files for OperaMini and similar - field "version" should always be "1.0", as it's indicating version of .desktop file format, *no* version on program itself. It seems, that Hildon doesn't care anyway, so it's really minor glitch.
First of all, I fixed the "version" issue in the latest test builds.
Thanks for this tip.

http://davy.preuveneers.be/phoneme/public/maemo/deb/

Now, the "pausing" part. This is very difficult to do it "right". You
cannot pause an application at will, because there might be some
transactions going on (imagine a network connection that times
out while pausing). It would break the application. Ideally, the
application (or midlet) should be in a quiescent state. To
understand why quiescence is tough, have a look at [1].

I could see if there are ways to block the process with a signal,
as suggested, or pause the thread in which the phoneME VM is
running, but I cannot give guarantees that this will always work.

Cheers,
Davy

[1] J. Kramer and J. Magee. The evolving philosophers problem:
Dynamic change management. IEEE Transactions on
Software Engineering, 16(11):1293–1306, November 1990.
 

The Following 2 Users Say Thank You to DavyP For This Useful Post: