Thread in another point of entry of spawning

I'm looking to develop an application that has a background service and a front end GUI (2 points of entry).  I understand how to have a runtime shared store so that the GUI can access data/events from the basic service.  But how do I generate a thread in the background entrypoint, while in the entrypoint GUI.  Should I call app.invokeLater () on the background application?  Is - illegal to do if you're not in the context of this application?

Send your background request a notification using the global event.

invokelater on the instance of the application should also work, but seems a little dirty to me

Tags: BlackBerry Developers

Similar Questions

  • Running the background (sms listening thread) connected to the GUI (another point of entry) application thread

    Hi, I'm new to the development of Blackberry, I read everything on the application running at startup and have a different point of entry for this application. I still need help with my application

    I use BB JDE 4.7

    Simulator: BB 9530 4.7.0

    I'm developing an application of SMS. (extends UiApplication)

    1) there is a thread that listens for incoming messages

    2) there is a wire which is a SMS sender

    3) there is a main screen and two full screens. for example, when the user clicks a button in one of the screens full... I send you a message

    (4) when a message is received, based on the content of the message I push either a full screen

    (5) I have, all the wires and screens as the class internal to the main class that extends from the UiApplication.

    I got the basic features. I need help making that demand the application of autostartup

    (1) I need to start listening to the sms thread when the BB phone starts

    (2) I need to have the application icon in the applications screen as another entry point for the application (only for the GUI), and the listening thread must remain active in the background.

    (3) when an incoming message is detected, the application GUI should be brought to the foreground (if it isn't already forground) after posting a popup (instead of bring the application to the foreground, is it better to display a flashing icon in the status bar of the home screen blackberry and perhaps global popup)

    (4) when the GUI of the application part is closed, I need to stop the sms sending thread, and when the system shuts down, I need to stop the listening thread.

    Please help me guys... I have read many articles and discussions regarding the automatic start-up of applications, another point of entry, the # of background threads...

    but I couldn't find how to implement my needs.

    (1) should I need to create two different projects (applications [GUI thread, a sender] and one for the listening thread)? or I can achieve in single application?

    (2) should I have to sign in the background thread to the GUI app? If so, how?

    (3) it is necessary to use the RunTimeStore object? If so, I don't know how I can bring to the foreground the application GUI of the background thread.

    (4) if I have to stop the thread of listening by overiding onExit() method, the important question I have is, if the onExit() method is only for applications that extends from the Application class and not for the UiApplication class?

    (5) if I should have two projects (one main and the other as a spare point entry), which project should I do as "autorun at startup" and a "system module".

    As I need to have the background still running thread when the GUI application is active. I don't know how I do.

    Hello world...

    I reached my needs thanks to a single application. I used an other entry point.

    To refer to chk my other post

    http://supportforums.BlackBerry.com/T5/Java-development/how-to-avoid-creating-two-instances-of-the-a...

  • How to access my application UI of another point of entry?

    I have a user interface with another application entry point. In the other entry point, I put the fix times and always check this time around (using RealTimeClockListener). If the smartphone to go at this time, it will grow a screen of my application user interface. And he pushed successfully. In this screen have an ex "New button" button, usually when I run my application user interface and click it, it will push a new screen.  But in this case, when the screen is pushed to the other entry point, I can't do action on this screen, I click on "new"button and no display of thing...

    How can I solve this problem?

    You can use a shared in the store of runtime service. or after a global event.
    ApplicationManager allows to validate a global event and register a GlobalEventListener with your application class to listen to it.

  • Added that another point of entry but now cannot request signatures

    I added a project in my workspace to be used for another entry point that will 'init' for the main project to add backup / restore features of my persistent data. However, since the addition of this project the opportunity to "Request for signatures" to sign my application is greyed out.
    I followed the instructions in the guide to the BlackBerry Developer about adding a project to a different entry point.

    Serving as alternative entry point is in the same workspace as the right of the main application? If I remove the new menu item entry alternative app to request signatures returns to normal.

    Well, I don't understand what the problem was, but I solved this by doing a new workspace and adding 2 projects. I couldn't make it work with the existing my original project workspace.

  • Bring the app to the forefront of another point of entry that runs in the background

    in my case, I have two entry point is main which is used ti open ui and the other who work in the background to receive the push. I'll call you

    Application.getApplication () .requestForeground ();

    to bring the app to the first plan but it create instance of the application and opens the app I don't want this, I want the main application to be in the foreground, any help please...

    Please click on these links to open and transfer data from main application context.

    1)

    http://StackOverflow.com/questions/11555165/BlackBerry-alternate-entry-point-start-app-from-backgrou...

    2)

    http://StackOverflow.com/questions/11582112/BlackBerry-how-to-transfer-data-from-background-to-main-...

  • Another point of entry without rebooting

    I have an application with two possible main objects:

    • UiApplication, foreground process, we call it FG_UIApp
    • Application of the background process on the auto-run-start, we call it BG_App

    For debugging, I want to kill the BG_App by sending a FG_UIApp GlobalEvent. OK, it works perfectly. Now, the BG_App does not work. It doesn't work anymore, when I do a full reboot. But now I would like to be able to start the BG_App again without rebooting. I thought in a way like this:

    1. the user clicks on the application
    2. now check if BG_App is running, when it doesn't work, just start it
    3. for the user nothing happens, so he will again click on the app
    4. now, checking, if BG_App is running-> it works, so now we can start FG_UIApp

    To do this, I've implemented the following code. Step 1 + 2 work, but when I do the step 3 the debugger tells me, that my application is already running. Is it possible to simulate the autorun entry point without having to reboot?

    public static void main(String[] args) {
      boolean startbackground = false;
      if ( args.length > 0 && args[0].equals("autostart"))
        startbackground = true;
      else {
        boolean runtimestorevalues_are_existing = false;
        // checking some values in the runtime-store,
        // which are set by BG_App    // if these values, don't exist, we start
        // the background-process
        if (!runtimestorevalues_are_existing) startbackground = true;
      }
    
      if (startbackground){
        new BG_App().enterEventDispatcher();
      }
      else {
        new FG_UiApp().enterEventDispatcher();
      }
    }
    

    Best regards, Anil

    Hello Mark!

    After playing with the ApplicationDescriptor change, it works. The solution is here:

    /*my cod-module is called fooin my jde I have 2 projects - foo (the gui-application, called with no arguments) - fooautostart (the backgroundapp, called with the argument "autostart",     it is generally called, when the device is booting)*/public static void main(String[] args) {if ( args.length > 0 && args[0].equals("autostart")){  new BG_App().enterEventDispatcher();}else {  RuntimeStore rts = RuntimeStore.getRuntimeStore();  boolean runtimestorevalues_are_existing = false;  /*  now checking some values in the runtime-store,  which are set by BG_App; if these values, don't exist,  we have to invoke the background app in simulating the  startup-entrypoint;  */  if (!runtimestorevalues_are_existing){    try {      int modHandle = CodeModuleManager.getModuleHandle("foo");      ApplicationDescriptor[] apDes =        CodeModuleManager.getApplicationDescriptors(modHandle);      String[] args_for_descriptor = {"autostart"};      ApplicationDescriptor descriptor =        new ApplicationDescriptor (apDes[0], "fooautostart", args_for_descriptor);      ApplicationManager.getApplicationManager().runApplication(descriptor);
    
        }    catch (Exception e){      System.out.println("background start exception ex: " +         e.toString() + ": " + e.getMessage();    }  }  new FG_UiApp().enterEventDispatcher();}}
    

    Thanks and best regards to Canada.

    Anil

  • Bb-ant-tool to implement using point of entry

    Hello

    I am able to build one application to another point of entry with JDE...

    But does require no special configuration if I use bb-ant-tool to build?

    Problem solved.

    http://BB-Ant-tools.sourceforge.NET/docs

  • Skype error: "Skype.exe point of entry not found the procedure entry point ntalpcsendwaitreceiveport...". »

    Sorry for the ridiculously long title, but that is exactly the error I get.  When I contacted my friends @ Skype that they just told me it's associated windows problem.  I thought, but the error message appear says SKYPE not Windows. Anyway, there is a certain irony in all of this that Skype is a Microsoft company. I'm absolutely furious since Skype perhaps in conjunction with Windows has developed a kind of points of failure...

    Original title: skype.exe point of entry not found the procedure entry point ntalpcsendwaitreceiveport could not be found in the dynamic link library.

    Please note that the thread referenced in 'Question (1)' has been marked as the answer by a moderator, and not by the person who asked the question.  It is highly unlikely that will help in the Safe Mode, starting in a start-up in minimal mode or sfc/scannow configuration. Of course, you're welcome to try these things.

    Uninstall and reinstall of Skype as suggested in "Question 2" would have been my first guess, but a bit of searching online suggests that it also assisted.  Again, try if you wish.  When you uninstall Skype, you will not lose your contacts.

    Research online, I've mentioned suggests that the problem is caused by software Kies from Samsung.  You have this installed on your system?  If so (or even if not), go to C:\Windows\system32 and rename avrt.dll.  You can call it avrt.dlX or something else you like.  Reset.  Let us know if that fixes the problem.  If it didn't, or he did something another break, you can always change the original name (this is why rename is safer than deletion).

    Reference: http://forum.renoise.com/index.php?/topic/31412-solved-ntdlldll-ntalpcsendwaitreceiveport-error-on-startup/

  • Backup and restore does not work, it always tells me to choose another point restor and try again.

    Each restore point I try he always tells me to choose another point of restor and try again.

    . Get your updated antivirus program and start safe mode.  Note that some viruses can hide from your normal antivirus program, so you really need to scan mode without failure.  To enter in Safe Mode when you turn on first, press F8 on every seconds until you get the menu, and then select Safe Mode.  Then run a complete system scan.
    -
    Microsoft has suggestions and offerings to
    http://Windows.Microsoft.com/en-us/Windows7/how-do-I-remove-a-computer-virus
    -
    Moderator Forum Keith has a few suggestions along this line to
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-performance/Windows-Explorer-has-stopped-working/6ab02526-5071-4DCC-895F-d90202bad8b3
    -
    If that suits him fine. If this is not the case, use system restore to go back to an earlier date at the beginning of the problem.  To run system restore, click Start-> programs-> Accessories-> System Tools-> system restore.  Click on the box that says show more restore points.
    -
    You can check the corrupted system files.  Open an administrator command prompt and run SFC if the above does not help. Click START, and then type CMD in the search box, right-click on CMD. EXE, then click on run as administrator. Then from the command prompt, type sfc/scannow.
    -
    Finally if all else fails, you can look at the rather cryptic system event log.  To make, click Start-> Control Panel-> administration-> event viewer tools.  Once in Event Viewer system log-click and scroll entries looking for these "error" with indicator see if you can find guidance on where the problem may be.
    `
    I hope this helps.  Good luck.

  • Windows easy transfer will not work. I get the message: "migwiz.exe - point of entry not found. How can I fix it?

    Windows easy transfer will not work.  I get the message: "migwiz.exe - point of entry not found.  How can I fix it?

    Hi PTTimothy

    1. what operating system is installed on the computer?

    2. you are the administrator of the computer?

    I suggest you to check and to provide us with the information about the installed operating system.

    http://Windows.Microsoft.com/en-us/Windows7/help/which-version-of-the-Windows-operating-system-am-i-running

    Step 1:

    You can open the administrator and verify if you can open Windows Easy Transfer correctly.

    You can even check if you face the same question in the user account different or new user account.  You can create a new user account on your computer, and then check.

    Create a new user account-
    http://Windows.Microsoft.com/en-us/Windows7/create-a-user-account

    Step 2:

    An analysis of the SFC and audit-
    a. click Start, click programs, on Accessoriesprincipally made, right click guestand then click run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click Allow
    b. type the following command and press ENTER:
    sfc/scannow
    A message appears indicating that "the system scan will start. Be patient because the scan can take some time.
    c. If all files require a SFC replace will replace them. You may be asked to insert your Win7 DVD for this process to continue.
    d. If everything is correct you should, after the scan, see the following message "resource protection Windows not found any breach of integrity".
    e. once the scan is finished, close the command prompt window, restart the computer and check.

    Check the link below for further guidance on scan SFC - mentioned
    http://support.Microsoft.com/kb/929833

    I hope this helps.

  • Get FL.exe - Entry Point not found 'point of entry procedure for NtAlpcSendWaitReceivePort not found in the dynamic link library ntdll.dll' error at boot fruity loops.

    Original title: ntdll.dll error at boot fruity loops.

    get FL.exe - Entry Point not found 'point of entry procedure for NtAlpcSendWaitReceivePort not found in the dynamic link library ntdll.dll' error when I try to start fruity loops after installing Kies from samsung for the new phone. How can I fix this error? Help, please. Thanks in advance! :)

    Hello
    I suggest you contact support FL. I couldn't find all of the resources for this program.
    Eddie B.

  • .exe error] is not found the procedure entry point AddAtomW Entry Point not found in dynamic bindings KERNEL32 library. DLL when I try to run any program. I have

    Original title: [ProgramName] .exe Entry Point not found

    I get this message: the point procedure entry AddAtomW could not be found in dynamic bindings KERNEL32 library. DLL when I try to run any program. I don't know what to do. Help please!

    Hello

    1. did you of recent changes on the computer?

    Method 1:
     
    It is possible that some third-party programs installed on the computer is causing the problem.
    I suggest that you put the computer in a clean boot state and check if it helps.
    To help resolve the error and other messages, you can start Windows Vista or Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.
     
    See the link below to learn more about how to clean boot.
    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353
     
    Reset the computer to start as usual
    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:
    (a) click Start, type msconfig in the search box and press ENTER.
    (b) If you are prompted for an administrator password or for confirmation, type your password or click on continue.
    (c) under the general tab, click the Normal startup option, and then click OK.
    (d) when you are prompted to restart the computer, click on restart.

    Method 2:

    Put your boot system helps determine if third-party applications or startup items are causing the problem. If so, you need to maybe contact the manufacturer of the program for updates or uninstall and reinstall the program.

    See the following article in the Microsoft KB for more information on how to solve a problem by performing a clean boot in Windows Vista or Windows 7:

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135

    Note: after a repair, be sure to set the computer to start as usual as mentioned in step 7 in the above article.

  • Error, "the point procedure entry SUnMapLS_IP-EBP_28 be found in the dynamic library KERNEL32.dll." during installation "manufacturer of T-Shirt Hanes.

    Original title: Point of entry not found

    I'm trying to run an old program, Manufacturer of T-Shirt Hanesand get the error, "the entry point of procedure SUnMapLS_IP-EBP_28 not found in KERNEL32.dll dynamic link library.
    I'm running Vista 32 bit.
    Any help would be greatly appreciated.

    Hello

    1 see if that helps you.

    Right-click on the setup.exe > and then select run as administrator to install it.

    2. ask the manufacturer to program if it is Vista Compatible.

    We can not help you with that that Microsoft no longer has the link Vista Compatibility Center available.

    3. If the program is not Compatible Vista, install in Windows Compatibility Mode

    "Using Windows 7 or Vista Compatibility Mode.

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-compatibility-mode/

    See you soon.

  • I burned some media files on a DVD-R. However when I tried to burn another point, I have a display message asking me to format the drive.

    I have vista Home premium with IE9. I burned some media files on a dvd - r. However when I tried to burn another point, I have a display message asking me to format the drive. I do not understand what that the drive has been formatted. I know from a previous answer that I format the disk, then all the content wil be removed and so I don't want to do. But how do I continue to burn items on the disc. I know everyone is busy here, but I hope someone finds the time to answer. Thank you for being useful to me recently. sincere love to all,

    original title: reformatting a dvd - d

    Did you close (or complete) of the DVD when burn you first your files on it? If you do not email us any more data on DVD-R, you will need to use a second DVD-R disc.

  • Iexplore.exe: point of entry not found

    Hello

    I tried to fix this error: " iexplore.exe: point of entry not found." The procedure entry point SpoolerInit be found in the dynamic link WINSPOOL library. DRV "but could not find anything useful. He was 4-5 months because I'm having this error message appears whenever I start my laptop. It would really help if someone help me with this. I use Windows 7.

    Thank you!

    Frozen5

    Original title: iexplore.exe error

    Hello

    Thanks for posting your query in Microsoft Community.

    I understand that you are facing this problem, for some time.

    I'll try my best to help you in the matter of fixing.

    But I would like to know some information to help you better.

    (1) where do you get this error message?

    (2) that you get this message while accessing any program or Internet Explorer?

    (3) don't you make changes before this problem?

    (4) have you any questions of access to the Internet through Internet Explorer?

    At the same time, I suggest you follow the following suggestions to solve the problem.

    Method 1: I wish that you start the computer in safe mode and then try to check the question because, in safe mode is an option of troubleshooting for Windows that starts your computer in a limited State. Only basic files and drivers needed to run Windows are started.

    Step 1: See the link to start in safe mode.

    Startup options (including safe mode).

    http://Windows.Microsoft.com/en-in/Windows7/advanced-startup-options-including-safe-mode

    Step 2: If you are able to turn off the computer in safe mode, I suggest you perform the clean boot because your system in a clean boot state can identify if all parties third party applications or startup items are causing the problem. You must follow the steps in the article mentioned below to perform a clean boot. See the link to perform the clean boot.

    How to perform a clean boot in Windows

    http://support.Microsoft.com/kb/929135

    Note: See "How do I reset the computer to start normally after a boot minimum troubleshooting" to prepare the computer to start as usual after a repair .

    Additional information:

    Install Windows updates in Windows 7

    http://Windows.Microsoft.com/en-us/Windows7/install-Windows-updates

    I hope this helps. Otherwise, feel free to write us again with the required information and we will be happy to help you.

    Thank you

Maybe you are looking for