We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Is it possible to run an app in background when it´s closed? The app shouldnt exit when the back button is pressed,it should run minimized to perform actions.
greetz
Answers
Back button?
How are you deploying your sketch?
Edit- Nevermind, I see this is in the "Android Mode" forum.
What do you want your app to do when it isn't visible?
Processing's Android implementation uses an
Activity
, which is only capable of performing actions when it is displayed (this is the user-viewable part of the app). To run code in the background, you need aService
. Processing does not currently supportService
s. If you want to include this functionality in your app, you will probably need to move to a bigger and better IDE, such as Eclipse.At this point, you should probably re-evaluate exactly what you want to achieve. Perhaps Processing isn't the best choice for writing the app that you have in mind. If you do switch to Eclipse, though, you can continue to use Processing's APIs... it is just a little bit more complicated.