mozilla / pluotsorbet

[ARCHIVED] PluotSorbet is a J2ME-compatible virtual machine written in JavaScript.
GNU General Public License v2.0
238 stars 46 forks source link

start background midlet on device startup, then keep it running #727

Open mykmelez opened 9 years ago

mykmelez commented 9 years ago

For midlet suites that include a background midlet, we should start the background midlet on device startup and keep it running all the time, even if we only start a foreground midlet when the user explicitly launches the app.

mykmelez commented 9 years ago

Our only known workaround here is to create an alarm, using the Alarm API, that periodically starts the app (if it isn't already running) to start the background midlet. Not ideal.

Background services or (its successor?) BackgroundSync would help, and perhaps they're the platform droids we're looking for. Also see bug 1019785.

Although the background midlet model we're emulating (implemented on some Nokia devices, and enabled by the Nokia-MIDlet-bg-server JAD attribute), seems to keep background midlets running continuously, whereas BackgroundSync sounds designed to periodically wake up an app, which is not much better than the Alarm API.