Discussion Board

Results 1 to 9 of 9
  1. #1
    Hi all,
    I'm writing an agent application, which supposed to run in the background.
    1. I've added a "hide" button to the main form. It's duty is to move the application to run in the background. How can I do it?
    2. How can I define a special key combination so that if the application will run in the background, it will listen and then load. What kind of listener should it define?

    Thanks to all the helpers,
    Alon
    Last edited by alonish; 2005-08-25 at 20:50.

  2. #2
    Regular Contributor mshita's Avatar
    Join Date
    Oct 2003
    Location
    Portland, OR
    Posts
    152
    Are you talking about J2ME???

    MIDlet can not run in the background. However, wait until MIDP3.0 comes out and this will be possible!!

    Mounir

  3. #3
    Nokia Developer Moderator petrib's Avatar
    Join Date
    Mar 2003
    Posts
    9,412
    However, if you don't want to wait a year (or however long it takes) for MIDP 3.0 to be complete, and then another year for the first phones with it, you need to find other solutions to your problem.

    If Symbian based phones are OK for you, you can do what you want if you write your app in C++, instead.

  4. #4
    Regular Contributor mshita's Avatar
    Join Date
    Oct 2003
    Location
    Portland, OR
    Posts
    152
    I don't know what your agent app will be doing so this might not be usefull. But another way around your problem could be using the PushRegistry in MIDP2.0. You won't be able to start the app with a key stroke combo, but you could be using a time or have a remote server send a SMS to launch the app.

  5. #5
    Thanks for your replies,
    I was really sure that this is possible.
    I've installed a freeware on my 6600 called: "ScreenTaker". This application has a "hide" button, which moves it to the background. when the user press a specific key combination (such as menu+another key), the application goes back to foreground, and saves the current screen.
    I want to write a similar application, which means -running in the background (the application would contact a server once an hour), and when the application has a messsage for the user it will come back to foreground.
    Waiting for your replies,
    Thanks and best regards,
    Alon

  6. #6
    Registered User Santos's Avatar
    Join Date
    Sep 2005
    Posts
    6
    With that particular phone (and I believe some more Nokia 60's), when you press the red (hang up) button, the application will be send to the background. I haven't looked into that much, but I assume it will be in paused state and I'm pretty sure you can't handle any key presses in background.
    But what you want to do you could do via the push registry, with an alarm you could start your app that will go online and do whatever, and register a new alarm to do the same an hour later.

  7. #7
    A background application can listen to key presses, as I wrote in my previous post. There are softwares which do that, such as: screen taker: http://www.symbianware.com/product.php?id=screentaker60

    If somebody has an idea how to perform what i've described in my previous post, please reply.

    Thanks,
    Alon

  8. #8
    Registered User Santos's Avatar
    Join Date
    Sep 2005
    Posts
    6
    ^Yes, but j2me apps can't.

  9. #9
    Registered User suzier's Avatar
    Join Date
    Aug 2006
    Location
    PARIS, FRANCE
    Posts
    11
    With Sony Ericsson and Nokia S60 phones, you can put the midlet in Background by setting : Display.setCurrent(null).

    On Sony Ericsson, when a midlet is in background (not visible), you can not use the another midlet and the Photo application.

    In background mode, you can start HTTP connection or file scanning (JSR-75). But I don't know if you can catch key pressed.
    Quang-Hai PHAN

Similar Threads

  1. Can midlet run in the background thread?
    By crazyII in forum Mobile Java General
    Replies: 9
    Last Post: 2010-01-19, 16:44
  2. How to run app in background
    By nayani in forum Symbian User Interface
    Replies: 3
    Last Post: 2005-06-03, 10:18
  3. Run exe Background.
    By debasish1234 in forum Symbian C++
    Replies: 0
    Last Post: 2005-01-18, 09:15
  4. set apps to be run background manually
    By Rx-lee in forum Symbian C++
    Replies: 2
    Last Post: 2004-09-14, 08:58
  5. Run HandleSessionEventL() in background
    By chinazou305 in forum Symbian C++
    Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved