Solved

Running a mobile application in the background

Posted on 2004-10-14
7
138 Views
Last Modified: 2010-03-31
i am developing a game which should run in the backgroun,and at periodic intervals display a canvas on the screen, the rest of the time the defautl phone screen should be displayer and the normal working of the phone should not be affected.The application should continue to run even if other applications are opened on the phone.
0
Comment
Question by:ThreeSixtyKL
  • 3
  • 2
7 Comments
 
LVL 11

Expert Comment

by:cjjclifford
ID: 12306895
since you asked in the Java section, I'm guessing MIDP application... since each application is supposed to be started in a new JVM instance each time, there is no (standard) way to do what you want - "running" things in the background would generally be done with a Thread, but that would be something running in the background to the rest of your application, e.g. a IMAP poll in the background of a email client.
However, since the application is started in a seperate JVM instance, when it returns to the main menu, this JVM is likely to be gone, along with all its threads etc.

However, some Operating Systems do provide mechanisms for what you want, e.g. Symbian and Blackberry - these are non-standard APIs, but generally allow various timers to be setup with tasks being run periodically (even processes receiving time-events periodically, e.g. Calendar alarms, etc.
0
 

Author Comment

by:ThreeSixtyKL
ID: 12316291
thanks for answering,but can u give me an idea on how to set up these timers in Symbian os, and yes i am doing the project in the MIDP API.
0
 
LVL 11

Expert Comment

by:cjjclifford
ID: 12317060
actually, now that you ask, I've had another look (I've never actually developed something like this, but had to do some research, as we needed exactly this functionality for something, so we had to figure out what could/could not be done), and it is not generally possible, as far as I can figure, to do this with an MIDP application, in fact, Symbian seems to be fairly straight with the profile definition. The route my research led me was to look at the C++ development environment, sorry...
However, Symbian information is available at: http://www.symbian.com/developer/techlib/papers/java_MIDP.asp
0
 

Author Comment

by:ThreeSixtyKL
ID: 12326147
Is the development of the application possible in C++? have u developed it?

Is there a way by which i do not close my midlet but hide it so that it is still running in the background?

Thanks for you time.
0
 
LVL 11

Accepted Solution

by:
cjjclifford earned 500 total points
ID: 12337066
Hi,

Nope - we didn't actually go as far as to develop something in C++, sorry!
As for not closing a Midlet, but leaving it running in the background, AFAIK there is no standard MDIP way of doing this (but as I said before, some platforms may have their own proprietary libraries, etc - e.g. the Blackberry Java environment).

Cheers,
C.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question