1. Shreyas's Avatar
    Hi all,

    I am developing an app. (like google talk) which at phone boot-up starts a background service which is continuously running. This service interacts with UI (means any request to server is first sent from UI to service & from service to server) & any response is sent to UI through service.

    What i know to start background service at boot up is "Create an alternate entry point and use that to start the background service. "

    Code:
    right click the project properties then go to Application tab, then check "Auto run on startup" / "System Module"
    is it right?

    In Android u can achieve this Service using system-defined Service class.
    I want to do it (UI & Service) in one project. How to achieve this in Blackberry 4.5?

    Any solution?
    Last edited by Shreyas; 09-30-09 at 09:02 AM.
    09-30-09 08:43 AM
  2. Shreyas's Avatar
    A background service is started at boot-up using "Create an alternate entry point and use that to start the background service. "


    But how to achieve the interaction between Service & UI (means any request to server is first sent from UI to service & from service to server) & any response is sent to UI through service.

    How to achieve this communication between Service & UI ?


    & how to close the Servcie programatically which is started at boot-up with "Auto run on startup / System Module" ?
    10-01-09 04:19 AM
  3. ydaraishy's Avatar
    Use the RuntimeStore.
    10-01-09 04:33 AM
  4. ydaraishy's Avatar
    Oh, and for the other half of your question, search for "alternate entry points"
    10-01-09 04:35 AM
  5. Shreyas's Avatar
    pls give me some code snippet describing how to use RuntimeStore.

    & to close the Servcie programatically which is started at boot-up with "Auto run on startup / System Module", I have to search for "alternate entry points" ?

    But as far as I know at a time we can do only one alternate entry point for a main application, m i right?
    10-01-09 05:07 AM
  6. ydaraishy's Avatar
    Please review the API documents for the RuntimeStore. Once you have understood it, you will be able to engineer a solution yourself. I'm not going to write code for you.

    Yes, go do some research on alternate entry points. The MessageListDemo in the JDE samples has some actual code you can look at.

    An application can have multiple entry points. Only one instance of the application has one entry point.
    10-01-09 05:21 PM
LINK TO POST COPIED TO CLIPBOARD