Start the Widget in the background

Hello

Is it possible to start a Widget app in the background, when the unit starts as if it was in Java applications using the entry point?

Kind regards

Nallo

Hi all

Here are the steps that I use to configure a widget to auto-run using VS 2008.  It seems to work with simulators as well as when the widget is deployed through BES 5.0.   Please try it and let me know if it works for you.

  1. Create a new BlackBerry Widget project in VS 2008.  Name it "AutoRunWidget".
  2. Build the solution with the Build-> order generate the Solution or F6.
  3. Use windows Explorer to navigate to the project folder and the forest down to the bin\OTAInstall folder.
  4. Find the AutoRunWidget.jad file in the OTAInstall folder.
  5. Right-click on the AutoRunWidget.jad file and select the copy"" command.
  6. Navigate to the top of two levels in the main project folder (one of the contains index.htm and config.xml).
  7. Paste the AutoRunWidget.jad file in the main project folder.
  8. In VS 2008 solution Explorer, click the button "show all files".  You should now see the file AutoRunWidget.jad previously the file config.xml and index.htm in the list (Fig 1).
  9. Make a right click on the AutoRunWidget.jad element and the select "include in project" menu command (Fig 2).
  10. In the Properties window, change the "Build Action" attribute for the file AutoRunWidget.jad ' Compile ' (Fig 3).
  11. Double-click the AutoRunWidget.jad file to display it in the editor VS 2008.
  12. In the content of the AutoRunWidget.jad file, change the line that reads "RIM-MIDlet-flags-1: 0" to "RIM-MIDlet-flags-1: 1"(Fig. 4). "»
  13. Save and close the AutoRunWidget.jad file.
  14. Clean the solution with the Build-> command clean the Solution.
  15. Rebuild the solution with the Build-> order regenerate the Solution.

That's all!   Please note that whenever you modify the config.xml file, you will need to repeat steps 4 to 15 so that these changes are reflected in the .jad file.

Coming up:

-How to set up a widget to auto-run using Eclipse.

-How to deploy a widget on the homescreen device instead of the folder "downloads".

Fig 1.

Fig 2.

Fig. 3.

Fig 4.

Tags: BlackBerry Developers

Similar Questions

  • Windows could not start the background service Itelligent transfer service on local computer. 87 error: The parameter is incorrect

    I had a crash dump blue screen, tried solutiions to the problem and told me to go to windows update and download all windows updates. downlownloading all updates failed and I got the error.

    Code 80246008

    Click on get help with this error and was instructed to go to services and start the background intelligent service services, it gave me the error message;

    Windows could not start the background service Itelligent transfer service on local computer. 87 error: The parameter is incorrect

    Not very computer savvy! no idea what it all means or what I would do to this topic! Thanks a lot for any help

    Try this:

    To change or restart the Service (BITS) Background Intelligent Transfer

    1. Open administrative tools by clicking the start , clicking Control Panel, clicking system and Maintenance, and then clicking Administrative Tools.

    2. Double-click Services. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    3. Right click on the service of Intelligent Transfer (BITS) background and then click Properties.

    4. Under the tab general, next to startup type, make sure that automatic (delayed start) is selected.

    5. Next to Service status, check whether the service is started. If not, click Start.

  • Start the background sound on slide 4

    I want to have the background on my Captivate 5.5 project, and audio needs a loop thoughout the project. But I don't want to start playing until the slide 4. Is it possible to do it, maybe with tip action?

    There is an audio accordion in the properties of the slide.  I haven't opened it yet, but I think that he has 'stop the background.'  I used it before you stop the background music when I have voice on and then let it resume later.

  • complete execution while the background thread runs

    After the passage of TestStand 4.1 in 2012, I see an interesting problem.

    I start a MainSequence via the SinglePass execution entry point using the parallel model. In ProcessSetup (in the execution of N), I start a background thread that performs certain tasks for viewing. Then the model passes by "Initialize TestSockets" and starts my MainSequence (in year N + 1).

    While the MainSequence is running, run N hangs in ParallelModel.seq > Single Pass, step "Wait for TestSockets", as it should. Usually, when the MainSequence is over, puts an end to execution and execution N goes to the next step "Check to terminate" and some time later, it passes through ProcessCleanup - where I'd send my background thread notification to stop.

    It works as long as I do not start the background thread. But when this thread is running, the execution of N + 1 never leaves the MainSequence. I arrive at a breakpoint at the end of MainSequence, ahead, and then all executions are happily showing a green light and continue to operate on. So running N never leaves "Waiting for TestSockets" and never reaches ProcessCleanup, so my son does not receive the signal of endpoint etc.

    But I distinctly remember that it worked in TestStand 4.1, and anyway, I don't understand this. Why, a background, started in the execution of N, thread prevents the execution of N + 1 to terminate?

    Concerning

    Peter

    "When execution starts a sequence in a new thread (not waiting for the thread to finish at the end of the sequence), should take care at the end of his MainSequence wire in order to put an end to herself in order for execution to terminate?"

    What do you mean by terminate? Process templates are not normally completed executions. Do you mean, "all discussions in an execution must complete before the end of the execution?"? If so, then the answer is Yes.

    I'm not completely your explanations above. I'm not sure what you mean by signs, but I think you're misunderstanding what terminate means in TestStand. Termination occurs only when a user explicitly requests a run to finish (e.g. finish all) or your sequence has an action to complete or by program initiates a terminate. Without endpoint explicit that past, executions normally end when all threads are finished executing. If you are spawning runs and new threads, you must come up with a mechanism to let them know when they have to leave. I do NOT recommend relying on or using termination for this. Termination is as abandoned (but with a cleaning), it is not intended to be something that happens in the normal flow of execution. There are several ways to tell your worker when all discussions. Perhaps this posting you are referring to is a way. You can also use a notification teststand step, or a Boolean value in reference parameter.

    Hope this helps to clear things up,

    -Doug

  • Firefox does not start, no error message, only works in the background

    I click on Firefox it does not start
    no error message it does not start
    It works in the background in 32-bit
    I have re installed it but nothing changes

    It is possible that your security (firewall, antivirus) software blocks or limit Firefox or the process of plugin-container without you inform, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox and the plugin-container in the permissions list in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

  • Firefox does not start because he says that it's another instance that runs in the background, but I checked and it is not a!

    Firefox does not start because he says that it's another instance that runs in the background, but I checked and it is not a! I have Linux Fedora 15 and I'm not the root. I spoke to the Manager and he said I should delete a file in the folder where firefox is installed and which can solve the problem. Can you help me?

    Thanks, Marius
    

    Upgrade your browser Firefox 8 and check

  • When I log in the background screen of Windows XP appears, but the icons, start menu and taskbar do not appear. What should I do?

    To start my computer upward as usual and takes me to open a session. I connect and my background appears, however my desktop icons, start menu and taskbar DO NOT appear. I can still access the Task Manager and command prompt, but when I try to use a command, absolutely nothing is happening, leaving this method of system recovery is not possible. What should I do?

    bleedorange1998,
    Thanks for posting with us.  I suggest try to start safe mode and see if it works correctly.  If Yes, then you can start using the "last known good configuration."   If in Safe Mode, you have the same problem, you should run chkdsk /r and sfc/scannow.  Here are the instructions for these suggestions.  Post back with the results.

    This article explains how to start the Windows Advanced Options menu: http://support.microsoft.com/kb/315222

    CHKDSK: http://support.microsoft.com/kb/315265

    SFC: http://support.microsoft.com/kb/310747

    Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to use the background rim start page: allowInvokeParams

    Hello

    How to use the element of the rim: background? what it is?

    1. To run javascript? openBISPushListener?
    2. Can you pass parameters between it and the content page?
    3. How to pass parameters between it and the content page?

    It defines a page will be loaded in the background when your application starts.  This page is intended to run any startup logic (for example starting listeners - Push is an excellent example) that your application may need to depend on, without any user interface.

    This background page is WITHOUT user interface.  Any attempt to interact with the user interface (for example change the DOM, calling alert() statements, etc.) will result in no action.  Nor will calls to redirect, since the background page does not interact with the pages of foregroud - if no query string.

    To answer your question - ' How do you pass parameters between it and the content page.  I suggest using a technique of storage like localStorage, WebDB, or same file offline.

  • horizontal navigation menu / widget library / change the background fill?

    I created a horizontal navigation menu of the widget library. Please, how can I change the background fill?

    I don't want to fill the empty background and for the State of the text change when knocked over or clicked on like a button.

    or I'm doing it is backwards?

    I create a button for each menu item. If so, how can I link other pages to the primary navigation?

    Hi Kristy,

    I share some of the documents that you can view and create wonderful menus for yourself.

    I hope this helps, let me know if you want more information about this.

    Best regards

    Ankush;

  • Start the observer data guard in the background

    Hello

    is there a way to start the observer keeps data in the background, without showing the credentials of the db in the list of processes?

    It is usually recommended to start with a command similar to this:

    nohup dgmgrl observer 'start' sys/XXX@dgtest &


    A simple ps unfortunately shows the sys password:

    Oracle@RAC-prod1: ~ $ ps - ef | grep dgmgrl

    Oracle 10225 9549 0 13:31:37 pts/1 0:00 grep dgmgrl

    Oracle 10072 9549 0 13:31:10 pts/1 0:00 dgmgrl sys/XXX@dgtest start observer

    How can I avoid this? How start you - run your observer?

    Concerning

    Thomas

    I agree that it is a security risk.

    I would probably try database credentials stored in a wallet.

    I'm sorry that I don't seem to have an example.

    Worth the trip:

    http://oracleprof.blogspot.com/2013/06/DataGuard-FastStart-failover.html

    Best regards

    mseberg

  • Start the machine in background mode

    Hello

    Is it possible to boot a machine in background mode?

    I use this command:

    "C:\Program Files (x 86) \VMware\VMware"-x "d:\VMware\Server\Server.vmx".

    But I don't want to see the computer window. It is enough if it starts in the background.

    Thank you

    You can use

    vmrun

    and the

    beginning

    command using the

    nogui

    setting to do so.  Take a look on: vmrunUsing vmrun to control Virtual Machines

  • When I close firefox, it always works in the background. When I want to open it again, there is a message that firefox is running and I have to close it. then I close with CTRL + ALT + DEL/taskmanager, according to me, / all this started to happen after u

    When I close firefox, it always works in the background. When I want to open it again, there is a message that firefox is running and I have to close it. then I close with CTRL + ALT + DEL/taskmanager, according to me, /

    This has happened

    Each time Firefox opened

    == After Update/update firefox

    Perhaps, you just need to wait for a while for Firefox download.

    Perhaps, it is an extension/plugin slowing your Firefox.

    When I close Firefox in the evening, it closes slowly and uses 50% of CPU. It unloads after several (30? 60?) seconds.

  • Once the programs are open a window pops up to say "program has stopped working". Even the programs that are running in the background when starting up are close. Help?

    Yesterday I connected my laptop and when I tried oppening a program a window pops up say "program has stopped working". I opened the control panel to start the troubleshooting, and another appeared window "Control panel has stopped working". I tried to open microsoft word and another window popped up, it is true, that you guessed it "word has stopped working". Does anyone know why all of a sudden nothing works?

    Hello

    try a SafeMode system restore to before the problem

    http://www.windowsvistauserguide.com/system_restore.htm

    Windows Vista

    Using the F8 method:

    1. Restart your computer.
    2. When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap theF8 key repeatedly until you are presented with theBoot Options Advanced Windows Vista.
    3. Select the Safe Mode option with the arrow keys.
    4. Then press enter on your keyboard to start mode without failure of Vista.
    5. To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
    6. Do whatever tasks you need and when you are done, reboot to return to normal mode.
  • HTML5 App - See the pop-up message window when in the background

    Hello

    I need my application to display a popup to the user even if the application is in the background.

    How can I do this if my application is built with html5 and JavaScript?

    Thanks for any help

    Hello Wadi,

    This has proved to be a bit of a monster post. If you have any questions at a stage any post, do not hesitate to ask. Let's dive.

    There are a few issues I see with the code you provided.

    PopupExtension.java


    • Creates an AlertNamespace object, your class is called PopupNamespace.

    PopupNamespace.java


    • getField is not implemented. \

    PopupFunction.java


    • A lot of import declarations are missing.

    I'll show you a comparison of my files, I managed to get the dialog box displayed from in my WebWorks app; No matter whether the application is in the foreground or background.

    For reference, the creation of my java files is based on the examples of code available here:

    https://bdsc.webapps.BlackBerry.com/HTML5/documentation/ww_developing/using_javascript_extensions_18...

    For starters, I have SandboxExtension.java. It is the equivalent of your PopupExtension.java.

    package sandbox.extension; 
    
    import net.rim.device.api.browser.field2.BrowserField;
    import net.rim.device.api.script.ScriptEngine;
    import net.rim.device.api.web.WidgetConfig;
    import net.rim.device.api.web.WidgetExtension;
    import org.w3c.dom.Document;
    
    public final class SandboxExtension implements WidgetExtension {
        String _widgetNameForFutureUse;
        BrowserField _browserFieldForFutureUse;
    
        public String[] getFeatureList() {
            String[] result = new String[1];
            result[0] = "sandbox.popup";
            return result;
        }
    
        public void loadFeature(String feature, String version, Document doc, ScriptEngine scriptEngine) throws Exception {
            if (feature.equals("sandbox.popup")) {
                scriptEngine.addExtension("sandbox.popup", new SandboxScriptable());
            }
        }
    
        public void register(WidgetConfig widgetConfig, BrowserField browserField) {
            _widgetNameForFutureUse = widgetConfig.getName();
            _browserFieldForFutureUse = browserField;
        }
    
        public void unloadFeatures(Document doc) {
        }
    }
    

    Main differences


    • I've updated my package to sandbox.extension it is unique (less chance that it has already been used.)
    • In getFeatureList, I and by using the function sandbox.popup; It was purely a personal choice I made during the implementation of the example. There is no real functional difference.
    • Subsequently to the first point, I also refer to sandbox.popup in my remaining code; more precisely within loadFeature.
    • My method of register sets two corresponding member variables.
    • I create a new SandboxScriptable object as opposed to your object of AlertNameSpace.

    The following file is SandboxScriptable.java. It is the equivalent of your PopupNamespace.java file. Note that this class must refer to the object that is created in the file above. In my case, I created an object of SandboxScriptable , so I'm now implement SandboxScriptable.java to define this object.

    package sandbox.extension;
    
    import net.rim.device.api.script.Scriptable;
    
    public final class SandboxScriptable extends Scriptable {
    
        private SandboxPopup _sandbox;
    
        public SandboxScriptable() {
            _sandbox = new SandboxPopup();
        }
    
        public Object getField(String name) throws Exception {
            if(name.equals("doPopup")) {
                return this._sandbox;
            }
            return super.getField(name);
        }
    }
    

    Main differences


    • Slight changes to naming to accommodate my variable names.
    • The getField function is (and must) be implemented. In fact, when a method is called, I check to see if it is the doPopup method. If so, I returns a SandboxPopup object. This would be your PopupFunction class. If the user does not call the doPopup method, I just pass back the default behavior via the super object.

    The final class is SandboxPopup.java. It is the equivalent of your PopupFunction.java. Above, we create and return an object of SandboxPopup , so in this file that we actually apply this that the object is actually.

    package sandbox.extension;
    
    import net.rim.device.api.script.ScriptableFunction;
    import net.rim.device.api.system.Application;
    import net.rim.device.api.ui.UiEngine;
    import net.rim.device.api.ui.Ui;
    import net.rim.device.api.ui.Screen;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.ui.Manager;
    
    public final class SandboxPopup extends ScriptableFunction {
        public Object invoke(Object obj, Object[] args) throws Exception {
            synchronized(Application.getEventLock()) {
                UiEngine ui = Ui.getUiEngine();
                Screen screen = new Dialog(Dialog.D_OK, "Hello World!", Dialog.OK, Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), Manager.VERTICAL_SCROLL);
                ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_QUEUE);
            }
            return "UNDEFINED";
        }
    }
    

    Main differences

    • I added all declarations of import for the different Classes of the RIM used.
    • I return a default value 'Not DEFINED' string regardless of the success.

    And that is the essence of the java files. Basically, it is a string of three classes; the first refers to the second, and the second refers to the third. In your example, the chain is slightly broken, however can be fixed fairly quickly based on the notes above.

    The next part that needs to be done is to associate your Javascript Extension with WebWorks. This can be done in two different ways.

    • Package your extension with your application. Described in the Javascript Extension guide link above.
    • Integrate your extension with your SDK WebWorks.

    I opted for the latter, I find this approach a little simpler. The first thing we need to do is to copy our java files in the extension folder. The extension root folder that I used is as follows:

    C:\Program search in Motion\BlackBerry 2.3.0.9\ext\ SDK WebWorks

    In this case, I created a folder sandbox.extension to House my extension:

    C:\Program search in Motion\BlackBerry 2.3.0.9\ext\sandbox.extension SDK WebWorks

    I then copied the folder src housing my files java to get the following file structure:

    Note that the CBC/sandbox sand/extension path is no coincidence because sandbox/extension's folder as dictated by the package structure that I used in my java files. More precisely:

    package sandbox.extension;

    The last thing missing is a library.xml file. I used the library.xml files available on Github WebWorks community API page as a starting point and made a few modifications for the following.

    
        
            sandbox.extension.SandboxExtension
        
        
            
                
            
        
        
            
                
            
        
        
            
        
    
    

    Key information

    • The is set to point to the class that implements WidgetExtension. In this chain of three java files, it would be the first file.
    • Under , I set path = 'src' since the real package begins in the src subfolder.
    • Under I've set the id to sandbox.popup.

    This file has been created under the sandbox.extension root folder, specifically:

    C:\Program search in Motion\BlackBerry 2.3.0.9\ext\sandbox.extension SDK WebWorks

    And that's all for the configuration of the SDK. Now, when I have an application that relies on this extension, I don't no need to include something more in my real application because this feature is now integrated directly with my SDK. To use this feature, I need to:

    • Include the feature in my file config.xml .
    • Call the function in my Javascript.

    My file config.xml looks like as follows.

    
    http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0">
        Sandbox
        Oros
        
    
        
    
    

    Very basic. The element indicates index.html will be our main entry point. The important thing here is that I have included the item with id = "sandbox.popup". " You will notice that it is the same id that we have defined in library.xml.

    Finally, here is a small sample application that gives the user a button. Once this button is clicked, a timer is called during 5 seconds. At the end of those 5 seconds, the extension (and in turn a popup dialogue) is called.

    
    
        
        
        
            
    
            
        
    
    

    As you can see, we add a to our page which, when clicked, will trigger the function of fire . The function of fire calls setTimeout with a founter of 5000 milliseconds.

    The reason for this is to give you the opportunity to stay within the application, or limit its application with the red end call button. No matter whether you are in the application or the application is reduced, after 5000 milliseconds, the invokeExtension function is called.

    In invokeExtension, you can see call us sandbox.popup.doPopup. sandbox. Popup is the object, we defined in library.xml and put subsequenty implement within our java files. doPopup is the function we defined to be processed in the java files.

    Still, if you have any questions about the foregoing, please let me know.

    Erik Oros

    BlackBerry Development Advisor

  • How can I stop programs@from running in the background?

    programs - I never userun in the background as institutional calendar. I would like to launch a clean background and a sleek office. Is ok to ermanently remove apps / programs I not have access? or better yet I can remove the icon without deleting the program I talk about these programs preinstalled. latter case your room for answerng this - what is the diffrence between apps widgets n programs on the droid.

    I'm sorry it explained not completely. I will try. Default apps cannot be uninstalled or removed. You can go into management applications in the settings and force closes, but it can start up if the operating system decides that she needs. There is an application that will allow you to hide the icons, but I don't remember the name. I don't know of a setting in the calendar application to prevent it from running. You might want to make sure that it is not set to automatically synchronize. This could be the reason why he is running. So the only way I know to keep them from running in the background is using a task killer, so the answer is always the same. I hope that I have cleared it up a little bit.

Maybe you are looking for