How to make a single instance of the application regardless of the main application and the other entry point for the application

Hello experts,

I explain the sceniro of my application. My request is mainly a time system as well as some other features related businesses. My app has a landing screen which is actually a custom made calendar that accumulates information captured time. There is also a time where entry screen user at will has worked time and other related information. The user has the option to run the application manually at the entrance of the time and see the reports and there the event listener to follow the events of call/SMS/e-mail that invokes the application automatically and user to the scree of time entry.

Problem one: I used headphones to follow the events of call/SMS/e-mail. When an event is called, alternet point of entry of the application the application is running. Application then get calls time, contact information etc. and push my entry screen with pre-filled information time.

As such, it works very well, as expected, but the problem is the number of instence that he is creating. Each track event creates a new instance of the application. I want to keep only one instance.

Two problems: to solve this problem, I removed the other point of entry and RuntimeStore to keep the running instance of my application. This instance of the application in a way keeps in singletone as such when the listener calls the application it finds that the application is running in the background. Then she moves the application to the foreground. It works very well, I mean the application user interface called on the foreground, but he won't have to time entry screen automatically as I hope. The block of code is as follows,

public static final long applicationID =0x8ddc44508679bd5bL;
static NSIApplication NSIInstance=null;
RuntimeStore runtimeStore = RuntimeStore.getRuntimeStore();

if (NSIInstance != null)
            {
                NSIInstance.requestForeground();
            }
            else
            {
                synchronized (runtimeStore)
                {
                    NSIInstance = (NSIApplication)runtimeStore.get(applicationID);
                                        //listener initialization
                    NSIListener.Initialze();
                }

                if (NSIInstance != null)
                {                   NSIInstance.requestForeground();
                                    //event's info manipulation and push the time entry screen                                     NSIInstance.RUN_NSIApplication();
                }
                else
                {
                    NSIInstance=NSIApplication.getInstance();
                    NSIInstance.RUN_NSIApplication();

                    synchronized(runtimeStore)
                    {
                        runtimeStore.put(applicationID, NSIInstance);
                    }

                    NSIInstance.enterEventDispatcher();
                }
            }

I expect a guideline to follow so that I can reach the expected my workflow. Thanks in advance

I can't propose to use the runtimestore to store instances of the application, as it was used on an example RIM, he has never worked for me.

I suggest to use a single point of entry and the automated screen using a global event or status in the runtimestore.

Tags: BlackBerry Developers

Similar Questions

  • I get my email on two computers. How to make a computer out of the loop?

    I get my email on two computers. How to make a computer out of the loop without jeopardizing my Comcast email account?

    Using Outlook Express? Go to: tools | Accounts and delete the account. If you think you can it in the future, go to the properties of the account, and under the general tab, simply uncheck: include this account when receiving or synchronization.

    If you are interested, you can receive messages at a time without losing them on one.

    On both machines:

    Tools | Accounts | Mail | Properties | Advanced - Check: leave a copy of messages on the server.

    On a single computer only, make sure to delete messages after X days to satisfy your allocated space that you get from your server.

  • How to call a second instance of the same VI?

    Hello

    I have a useful VI dealing with IO operations. To save some time, of what I would call the VI as a second instance do work at the same time. I created a sequence sub with the run option 'Use the new thread' and I called the Vi (a step of the sequence only). Execution time of the VI is about 20 seconds run Durin I called the subsequence and I carried on running my main sequence (parent). Since then 10 seconds to launch the subsequence (in the thread of sepatate I called the same VI as in the thought of subsequence the second instance will be created. However, instead of parallel work of the two instances of the same VI had to wait when mt subsequence end known call the VI th.

    So my question is, as in the topic: how to call a second instance of the VI even at the "same time"?

    Could you please tell me about the best approach to solve the problem?

    Any VI that you want to run in parallel must be paid also re-entrant, including screws.

  • How to make transparent cluster keeping only the elements inside the visible cluster?

    Hello

    Can anyone suggest me how to make transparent cluster keeping only the elements inside the cluster visible in the front panel.

    Thanks in advance,

    Vinciane

    As I said, use the space bar for what is paint. This works. Trust me.

    PS You cannot link to pictures stored on your hard drive. We don't see them. You must add them as attachments and then submit the post they get uploaded to the servers of NOR.

  • How to clear a single block of the current page in the OPS

    Hi all

    How to erase a single block of the current page in the OPS. I used the CLEAR key.


    Thank you

    Hello

    I found the solution I wrote it in the button DELETE. I wrote the remove with vo1.setMaxFetchSize method (1);

    and remove called AOS

    Thank you

  • How to make 'Save to Desktop' save the default value instead of 'This PC'?

    How to make 'Save to Desktop' save the default value instead of 'This PC'?

    Windows 10, I guess?

  • In CC Dramweaver Adobe how to make my Web page fill the entire window?

    In Adobe Dreamweaver CC how to make my Web page fill the entire window?

    A width of 100% CSS.


    Body {width: 100 %}}

    Nancy O.

  • How to make a web page to the size of browsers?

    How to make a web page to the size of browsers?

    Try to download the pdf file and the example in this tutorial files, which explain how to do this.

    http://www.Adobe.com/devnet/Dreamweaver/articles/bk_dwcs4_mastering_css.html

    PZ

  • How can I access all instances of the itemRenderer in a specific DataGridColumn?

    How can I access all instances of the itemRenderer in a specific DataGridColumn? Or, if I have a rowIndex and columnIndex, how do I get the itemRenderer to these clues?

    I use States to change the display of my itemRenderer of a TextField of a PopUpMenuButton. What I was trying to do was change back the display of all the other itemRenderers visible in the column of the textfield, when one of the itemRenderers displays the PopUpMenuButton.

    I tried to loop through all of the itemRenderers in the column and casting them as the class I was using and then by setting the currentState, but, it wasn't good performance wise and required too code. I simplified it listen to a change on the listData owner event (in my case a DataGrid, but any component ListBase) and by setting the currentState to null when it is triggered. Works like a charm.

  • How to make one of my computers line so that I can install LR and PS on a third unit and how do I tell Adobe about which computer is offline while I have only 2 operational at a time?

    How to make one of my computers line so that I can install LR and PS on a third unit, and how should I inform Adobe on what unit is online, at any time, so that I can use the other two?

    Richard,

    You can have the creative cloud installed and signed in on two computers as long as you don't use it on one at a time. Download and install as you did on the first computer, sign in to your Adobe account on the Adobe using your Adobe ID website, download the desktop app from clouds, then download the software.

    You can download the installer for Creative Cloud from here:
    Creative cloud help | Creative cloud desktop.

    After you install the creative Cloud desktop application, you will need to sign in with a login password and Adobe. Then you can install applications. This link provides more information and step by step instructions, if you need: CC help | Download, install, update or uninstall applications

    If you get a new computer, simply log out of creative cloud over one of the other and log on to the new.  Connect, disconnect you and | Adobe Creative Cloud desktop app

    Guinot

  • I am trying to install a program and I get entry point getdlldirectoryw could not be found in the library of links Dynamics kernel32.dll file and the same for shreggetvaluesw to shlwapi.dll

    I am trying to install a program and I get entry point getdlldirectoryw could not be found in the library of links Dynamics kernel32.dll file and the same for shreggetvaluesw in shlwapi.dll. How can I fix the problem.

    You have all your current updates?
    Go to windows updates and see if there are updates that you do not have installed.
    The error message seems to indicate that your copy of XP has not been updated.

    Updated and let us know if you still receive the error message.

    Thank you

    Marilyn

  • Another entry point for the issue of the application

    Hello

    As I read on this KB about to enter another application

    http://supportforums.BlackBerry.com/T5/Java-development/set-up-an-alternate-entry-point-for-an-appli...

    But on the KB above, the main application is UiApplication and other entry point is not UiApplication!

    1. I wonder how to create the entry point alternative in which the two project is UiApplication

    2. for example, I have the application main who have 3 screens A, B, C. When user clicks on the icon for the main Application screens A. When the user clicks on the application of alternative entry point (another icon on the home screen), B screen. I wonder how we can do?

    Thank you.

    No, you create only one project. the ASP is set to the application descriptor.

  • another entry point for the application

    Hello

    I want to create another entry point for my application... After going through various messages earlier I went to know that we can do this by selecting

    Project--> Application tab-->

    But, in a project Type tab I have only 3 options i.e. CLDC, Midlet, library and another entry for this point is turned off by default, one of my existing project into the current workspace is automatically selected it... I want to put there another project to another entry point...

    I also tried to download the image, but not due to an error downloading...

    Thanks a lot for your help.

    Have you checked this article?

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/796557/800738/800901/...

  • How to make a single symbol instance

    I have reproduced a symbol that contains text. How to make the symbol of a single copy, so when I change the text of the original symbol does not change?

    Duplicate symbol in the library, not the assets Panel. In this way, you'll have to similar looking symbols but they are 2 unique symbols.

    Otherwise, if you duplicate in the assets Panel, you can just use this:

    sym.getSymbol('yourDuplicatedSymbolNameHere').$('YourTextNameHere').html ('your new single text here');

  • single instance of the concurrent program

    How limiting it is only 1 instance of simultaneous application of a simultaneous to run at a time program already?

    for example, if the simultaneous program need exclusive access to a table, how can limit us only 1 instance of the simultaneous program is running?

    Currently, we are trying several bank statement loader (cash management module) and we suspect this program 2 charger fights for single temporary table: ce_stmt_int_tmp

    Do the incompatible competitor with itself

    Cannot make Incompatible concurrent programs with himself (Doc ID 436186.1)

    HTH
    Srini

Maybe you are looking for