Building my first application

Guys, I'm new to the forum. I built a base application that opens a menu IM--> system Messages.

However after that giving a sleep of 1000 ms the application switches to the MyScreen.java.However I don't want my MyScreen is visible. I want my Menu IM to stay on the bb screen, and then I want to access the menu--> options--> and the following screen... Help me pzzz. And don't forget that I am new to the community. Thank you

package mypackage;

import net.rim.device.api.system.ApplicationManager;
import net.rim.device.api.system.ApplicationManagerException;
import net.rim.device.api.system.SystemListener;
import net.rim.device.api.ui.UiApplication;

/**
 * This class extends the UiApplication class, providing a
 * graphical user interface.
 */
public class MyApp extends UiApplication implements SystemListener
{
    /**
     * Entry point for application
     * @param args Command line arguments (not used)
     */
    public static void main(String[] args)
    {
        //BlackBerryMessenger bbm= BlackBerryMessenger.getInstance();

   try {
            ApplicationManager.getApplicationManager().launchApplication("net_rim_bb_qm_peer");
         }
     catch (ApplicationManagerException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } 

     try {
            Thread.sleep(1000);
         }
      catch (InterruptedException e)
        {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        // Create a new instance of the application and make the currently
        // running thread the application's event dispatch thread.
        MyApp theApp = new MyApp();
        theApp.enterEventDispatcher();

     try
     {
            Thread.sleep(1000);
     }

     catch (InterruptedException e)

     {
            // TODO Auto-generated catch block
            e.printStackTrace();
     }

   }

    public MyApp()
    {
        // Push a screen onto the UI stack for rendering.
        pushScreen(new MyScreen());
    }

    public void batteryGood() {
        // TODO Auto-generated method stub

    }

    public void batteryLow() {
        // TODO Auto-generated method stub

    }

    public void batteryStatusChange(int status) {
        // TODO Auto-generated method stub

    }

    public void powerOff() {
        // TODO Auto-generated method stub

    }

    public void powerUp() {
        // TODO Auto-generated method stub

    }
}

I used your code then change MyScreen.java

Import net.rim.device.api.system.Application;
Import net.rim.device.api.system.ApplicationManager;
Import net.rim.device.api.system.ApplicationManagerException;
Import net.rim.device.api.ui.MenuItem;
Import net.rim.device.api.ui.container.MainScreen;

/**
* A class that extends the class screen, which offers default standard
* behavior for BlackBerry GUI applications.
*/
/ public final class MyScreen extends form {}
/**
* Creates a new object of MyScreen
*/
public MyScreen() {}
Set the displayed title of the screen
setTitle ("MyTitle");
addApplicationMenu (this);

}

/**
* Adds a menu that allows the user to perform various message store
* actions.
*
@param screen
Screen to add the menu to
*/
void addApplicationMenu (screen display) {}
AppendUnreadMenuItem MenuItem = new MenuItem ("open Messenger", 1, 1) {}
public void run() {}
try {}
ApplicationManager.getApplicationManager)
.launchApplication ("net_rim_bb_qm_peer");
} catch (ApplicationManagerException e) {}
e.printStackTrace ();
} {Finally
Application.getApplication () .requestBackground ();
}

}
};

mainScreen.addMenuItem (appendUnreadMenuItem);

}
}

and remove the code from MyApp.java. your MyApp will be like this

**
* This class extend the UiApplication class, providing a
* graphical user interface.
*/
SerializableAttribute public class MyApp extends UiApplication
{
/**
* Entry point for application
@param args command-line arguments (not used)
*/
Public Shared Sub main (String [] args)
{
Create a new instance of the application and make the currently
who runs the thread of the application of the event dispatch thread.
MyApp PAP = new MyApp();
theApp.enterEventDispatcher ();
}

/**
* Creates a new object MyApp
*/
public MyApp()
{
Push a screen onto the stack in the user interface for rendering.
pushScreen (new MyScreen());
}
}

(or just copy the code to PASE in your eclipse).

Tags: BlackBerry Developers

Similar Questions

  • I'm not able to install both on the same PC LabVIEW applications. I have uninstall the first application in order to install the second. Is there a way to avoid this?

    I wrote two LabVIEW applications. The first acquires data from three different devices, displays the data and writes it to a file. The second application reads the data and displays it on the screen.

    Can I install the first application and run it, but I can only install the second application if I uninstall the first application.

    Any ideas as to why this is happening?

    You install applications by using a Setup program created with the application builder to LV?

    What LV version do you use?

    You have a dedicated for each installer build script, or do you still want to change the settings of a single build script (which would be a reason for this behavior!)?

    hope this helps,

    Norbert

  • Where I can download generator Viewer so I can build my magazine application in android?

    Where I can download generator Viewer so I can build my magazine application in android?

    Are you trying to build a simple edition or multi-question application?

    If you create a simple editing application, you can't. We only support simple editing on iPads.

    If you build an application the opportunity to build for Android multi-question is on the first screen of the new app App Builder Wizard.

    Neil

  • Can not build waterfalls sample application: can not find the qmake configuration file

    When you try to build a sample application stunts for debugging on the PlayBook, I have some errors in the output.

    I am running Windows 7 (64 bit) using the QNX Momentics IDE.

    Here is the result:

    ----------------------------------------------------------------

    Build the unit for project HelloCascades debug configuration *.

    make the device debugging
    C:/SDK/BB10/host/win32/x86\usr\bin\qmake-spec unsupported\blackberry armv7le-g ++ o arm\Makefile device += HelloCascades.pro CONFIG
    WARNING: Did not find:... / SRC/.h
    WARNING: Did not find:... / SRC/.h
    X-unsupported\blackberry-C:/SDK/BB10/host/win32/x86\usr\bin\qmake-spec 86-g ++ o x86\Makefile simulator += HelloCascades.pro CONFIG
    WARNING: Did not find:... / SRC/.h
    WARNING: Did not find:... / SRC/.h
    make - C. / translations f Makefile update release
    make [1]: Entering directory "C: / SDK/BB10/Apps/translations
    C:/SDK/BB10/host/win32 / x 86/usr/bin/lupdate HelloCascades.pro
    Update 'HelloCascades_en_GB.ts '...
    Found 0 text (s) source (0 new and 0 already existing)
    Update 'HelloCascades_fr.ts '...
    Found 0 text (s) source (0 new and 0 already existing)
    Update 'HelloCascades_it.ts '...
    Found 0 text (s) source (0 new and 0 already existing)
    Update 'HelloCascades_de.ts '...
    Found 0 text (s) source (0 new and 0 already existing)
    Update 'HelloCascades_es.ts '...
    Found 0 text (s) source (0 new and 0 already existing)
    Update 'HelloCascades.ts '...
    Found 0 text (s) source (0 new and 0 already existing)
    C:/SDK/BB10/host/win32 / x 86/usr/bin/lrelease HelloCascades.pro
    Not found in directory name racineLe qmake configuration is not valid.
    Update 'C:/SDKs/BB10/Apps/translations/HelloCascades_en_GB.qm '...
    Generated translation (s) 0 (0 finished and unfinished 0)
    Update 'C:/SDKs/BB10/Apps/translations/HelloCascades_fr.qm '...
    Generated translation (s) 0 (0 finished and unfinished 0)
    Update 'C:/SDKs/BB10/Apps/translations/HelloCascades_it.qm '...
    Generated translation (s) 0 (0 finished and unfinished 0)
    Update 'C:/SDKs/BB10/Apps/translations/HelloCascades_de.qm '...
    Generated translation (s) 0 (0 finished and unfinished 0)
    Update 'C:/SDKs/BB10/Apps/translations/HelloCascades_es.qm '...
    Generated translation (s) 0 (0 finished and unfinished 0)
    Update 'C:/SDKs/BB10/Apps/translations/HelloCascades.qm '...
    Generated translation (s) 0 (0 finished and unfinished 0)
    make [1]: leaving directory ' C: / SDK/BB10/Apps/translations.
    make - c / arm f Makefile debugging
    make [1]: Entering directory "" C: / SDK/BB10/Apps/arm ' "
    do f Makefile.Debug
    make [2]: Entering directory "" C: / SDK/BB10/Apps/arm ' "
    Not find qmake configuration not found directoryCould extended fichierExemple of use OS qmake configuration before you define MAKEFILE_GENERATOR/usr/bin/sh: C:/Users/ROSSL~1/AppData/Local/Temp/make4028-1.sh: no such file or directory
    make [2]: * [o.le - v7-g/HelloCascades] error 127
    make [2]: leaving directory ' C: / SDK/BB10/Apps/arm.
    make [1]: * [debug] error 2
    make [1]: leaving directory ' C: / SDK/BB10/Apps/arm.
    make: * [Device-Debug] error 2

    Build completed *.

    I have bolded the output where I think the problem might be involved.  Is there a problem with the Makefile, or is it a directory I'm missing, or anything else?  I can't see why there is an error while compling.

    Thanks for any help.

    I have the same warnings qmake... is not found . But finally, after that I could successfully implement the objective of the Simulator, the sample application running, even with this qmake warnings.

  • How to build a web application for smartphones

    Salvation of venezuela, please I need the steps to build a web application for Smartphones using Webworks, what resources do I need to install in my computer to start my project?

    Hello

    A quick way to start is to download and install Eclipse with the bundle of BlackBerry WebWorks plug-in. It is available for download on:

    http://us.BlackBerry.com/developers/browserdev/devtoolsdownloads.jsp

    Alternatively, you can use the newer approach, of ripple:

    http://supportforums.BlackBerry.com/T5/Web-and-WebWorks-development/how-to-use-ripple-instead-of-the...

    See you soon.

  • Can I build a complex application like TaskRabbit using Adobe PhoneGap?

    Can I build a complex application like TaskRabbit using Adobe PhoneGap?  When someone asks someone else to accomplish a task for them, the money gets treated and held, and then the money is transferred once the task has been carried out and confirmed.

    "Can PhoneGap do xyz" issues can largely answered "Yes." Where it falls down is usually when the qualities and constraints are added. For example, you can build a Minecraft-like game to PhoneGap? Yes. Can you make such that it has the same performance as the equivalent written in C? Almost certainly not.

    Regarding your question, PhoneGap will only be part of the equation, as you must have/interface with a backend to track the completion of the task, funds on deposit and initiate transfers. Then, PhoneGap can do /part/ this? Yes. He can do all this? N °

    Of course, this answer would be the same even if you asked a native application. An application running on the client side can do - an app of this type would require some kind of backend to track everything.

  • First application opens, but never the workspace is displayed. I screw up a framework?

    First application opens, appears to load - I get app bar on top, but when I try to open an existing or new project... nothing. Tried to change the Workspace window, opening to a different file type, a simple .mov file import, but the workspace never shows up. MacBook Pro (mid 2012, i7 clocked at 2.6 GHz, 16 GB, 500 GB of SSD, Nvidia 650 M, El Capitan 10.11.1)

    Hi JohnnyL,

    + 1 for the comment John. However, if this does not work, rename this folder: Documents > Adobe > "Premiere Pro" to ' "Old_Premiere Pro". "

    Note: You will lose your customizations and keyboard shortcuts.

    Thank you

    Regalo

  • How to build a Web application on the blog?

    I need your help on a problem with the fact that I was struggling.

    So I try to build a web application to create a blog that is 'false '. I create the fields, updated my css, but I must be missing something because the page does not load the model that I created...

    How do you think I should create blog web app? Do you have step by step recommendations?

    1 million for your help thanks!

    Do not give you all the features of a blog and not as manageable auto. Yes, we build web app Articles all the time, but they will still not have archive features etc of the current blog.

  • Our first application

    I am pleased to announce that our first application developed with Adobe DPS already released in the appstore. It is the first of a collection of different travel guides with unusual ideas. It's in Spanish, but maybe in some time in English too.

    I hope you like it!

    http://iTunes.Apple.com/us/app/Guia-Londres-skpa/id550354761?l=es & ls = 1 & MT = 8

    Congratulations!

    Bob

  • Use the margin CSS-follow up of form "build your first site.

    I just finished the tutorial of DW part 6 build your first website in Dreamweaver CS4, which were great!

    Do I have a recurring problem with the 'margin' in CSS Tho files '.

    When I view my page in my browser, it is not centered (despite stating the margin: 0 auto; in the CSS page). Furthermore, when I am formatting the text in the main_image div spacing between my heading 3, heading 4 and paragraph do not respond to the commands of the margin for the corresponding CSS. Regardless of the height of setting, or margins used the text won't format because he should offered in the tutorial. The same is true even if I use margin_top:, margin-bottom: etc.

    In view of these two problem together am I missed something concerning the order of the margins. I posted all the files generated by the tutorial to the folder:

    www.malcolmshield.com/public_ftp/check_magazine/

    I've also attached the more critical (check_magazine.css & index.html)

    I'm new to the whole game, so my apologies in advance for the simplicity of the peoblem I to offer and if you can't get hold of the files to look over my code please let me know.

    Thanks in advance!

    M

    You are having problems it is because the margin: 0 auto can be used to Center elements only if the item has a declared width. Although your container

    width, is the reason why the page isn't centering is due to a mistake in your CSS:

    #container {
    width 968px;
    background: #FFFFFF;
    margin: 0 auto;
    padding-left: 10px;
    padding-right: 10ox;
    overflow: hidden;
    }
    

    The colon is missing after width. It should be this:

    width: 968px;
    

    Without the colon, the rule is not valid and ignored.

  • Errors during the demo 'building a Web Application with JDeveloper11g using EJB'

    Hello

    I'm going by the demo of building a Web Application with EJB using JDeveloper11g. The demo lasts great until "Running Java outside of Java EE container Service".

    I followed the steps "That runs the Java Service outside Java EE container" exactly as written:

    1. now, create a new persistence unit to run the java service outside the Java EE container. Right click on the file META-INF. Persistence.XML and select new Service Java façade in the context menu.

    2. in the Java Service façade to create, if necessary, click next to go to the home page. In the class of Service Java Panel, you can choose to create a new persistence unit (in the next panel) or use an existing unit. Select Choose a persistence unit or create one in the next panel and check the generate a checkbox in the main() method.

    3. the name of the persistence on the outside unit. Choose the JDBC connection and make sure that the JDBC connection is set to HRConn.

    4. all methods should be selected by default. Deselect some of them so that your selection looks like the following image. (Remove the 'byRange' methods)

    5. in the source editor window, for the JavaServiceFacade class, add a new line after the / / TODO comment and enter the following statement:

    Employees a = javaServiceFacade.queryEmployeesFindByName("P%").get(0);
    System.out.println (a.getLastName ());

    When I type the code above:
    Employees a = javaServiceFacade.queryEmployeesFindByName("P%").get(0);
    System.out.println (a.getLastName ());

    I get the following errors:

    Create method to "queryEmployeesFindByName".
    Separate declaration and assignment

    Any help is appreciated.

    Kind regards

    Kelly

    If you use this tutorial - the use of building 5407 http://www.oracle.com/technology/obe/obe11jdev/bulldog/ejb_jpa_jsf/ejb.html#t2s4

    Looks like the link to the tutorial page pointed to an older version.

  • SDK newby, build my first sample - no go...

    Hi all

    I would like to join in the creation of extensions ID.

    Currently, I'm working through the "getting - started.pdf.

    My Mac and tools.

    iMac with OS 10.7.3

    InDesign CS 5.5 (Version 7.5)

    Xcode Version 4.2.1 Build 4D502

    I installed "Adobe InDesign CS5.5 SDK" inside my folder "Applications".

    I followed the instructions in the "getting started":

    Start by double-clicking on any project SDK sample.

    This boots Xcode...

    So I can't make any sense of the statement, that is to say

    1. use the drop-down list Active target on the top left corner of the project window to ensure that you are

    generate the desired target.

    2. choose Build > rebuild # to do a clean rebuild of the project.

    I then tried the Terminal approach to things...

    The xcodebuild utility is useful to build XCode projects on the command line. For example, the

    following generates the output of the project target base of dialogue:

    xcodebuild-project BasicDialog.sdk.xcodeproj - target the Release version

    Yes I did cd myself in the right folder first. But it made no difference.

    Also:

    We recommend that you have both debugging and

    requests for dates. The application of debugging is

    instrumented to detect bugs and is essential for

    development of plug-in successfully.

    What does that mean? Is there a 5.5 different ID I need? Where can I get this?

    Thanks for the tips

    Romano

    Good to know that you finally have it upward and the work.

    If the problem is resolved, it is better to mark you the question answers to help others looking for a solution to the problem.

    Manan Joshi

    -Effective InDesign solutions-

    MetaDesign Solutions

    http://metadesignsolutions.com/services/InDesign-development.php

  • Help for building stand-alone application

    Hello

    Sorry for my English!

    I have to build a .exe from my main VI: the main vi contains some dynamic vi that I need to insert them into a school of my main vi for this I use a parent pah "path.vi of the Application Directory" to create references and when I run my

    application all work very well in machine mouthwash. But when I try to compile this application to create a .exe this exe does not 100% in my target machine. So I do not know that the problem is due to the creation of application normally settings the

    dynamic VI should be in the same directory of application.exe I think I introduced manually but I can't do all this help please!

    In the project window, move the VI out of dependencies and set up in the project.  When you open the App generator, VI should then appear in the list of project files (just like the other 2 files).  Then, you can use the arrow to move to the list always included.

  • Build the new Application (.app)

    I'm in LabVIEW 8.5.

    I would like to be able to create programs that run on a mac, but also a PC, and this page makes it look like I can do it by changing just the extension of .exe to .app under the target file name, well that whenever I have try and do it, it will automatically change it to .exe

    Also, when I right click Create specifications, he said "New-> Application (exe)" so it looks like in the version I can't .exe

    Is there an add-on application builder that I maybe need to download or purchase separately?

    Change the extension does not as magically make it possible for a file to .exe for Windows work on a Mac.  They must be compiled separately on each operating system.

    So build your application on a Windows computer that runs LabVIEW to create an executable file.  Then carry your VI to a Mac running LabVIEW and build an application here to create an executable file that can run on a Mac.

  • Click of the mouse stops working after you start the first application

    Hard to explain this problem.  First time I click on what either in an application after computer startup (Word, Excel, etc.) the arrow of the mouse moves, but the click does not, anywhere, not on the desktop, taskbar anywhere.  Accentuates not delayed anything either.  But when I press ctrl-alt-delete, move the arrow down to start the Task Manager and click here, then click Start to work and things get even once highlighted and everything seems normal.  HP Pavilion dv9000t Vista Home Premium 32-bit Intel Core 2 duo, 2 GHz, 2GBDDR, this is going on for about 6 months now.  I just noticed, I installed a trackball logitek, and after installation, it does the same thing.

    Hello

    ·         What is the brand and model of the computer or the mouse?

    ·         Did you do changes on the computer before the show?

    Follow the suggestions below for a possible solution:

    Method 1: I suggest you to run the Microsoft fixit from link and check mentioned below.

     

    Hardware devices do not work or are not detected in Windows

    http://support.Microsoft.com/mats/hardware_device_problems/en-us

     

    Method 2: I suggest you to check and clean the boot if the problem persists.

    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 troubleshooting, be sure to configure the computer to start as usual as mentioned in step 7 in the above article.

    Let us know the results.

Maybe you are looking for