Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Running a mobile application in the background

Posted on 2004-10-14
7
Medium Priority
?
142 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

688 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