Question of the main application class

Hey people out there!

A happy Friday to all just a quick question. The class that contains the main Sub public static in the BlackBerry application method, this class should be one that extends UiApplication or can the main method call the class that is responsible for this?

Thank you!

Schalk

You can try something like that.

class Test
{
    public static void main(String args[])
    {
        Xyz xyz = new Xyz();
        xyz.enterEventDispatcher();
    }
}
---------------------

class Xyz extends UiApplication
{
    Xyz()
    {
        pushScreen(new MainScreen());
    }
}

Tags: BlackBerry Developers

Similar Questions

  • Is it possible to have a common accessible file location for the main application in the sandbox and its extension app plugin

    I'm trying to launch an app on the app store for mac. The bundle of the main application and everything inside it is on sandbox.

    The main application Bundle identifier is com.xxx.core.app . The identifier for the internal Plugin Finder Extension application Bundle is com.xxx.core.app.extensions .

    Now the problem is the extension inner finder is also available in sand and trying to read a file written by the main application.

    The main application writes the file location depending on mac OS X, for example temp/var/folder/jv11743453495593/T/com.xxx.core.app

    But the internal Plugins try to read/var/folder/jv11743453495593/T/com.xxx.core.app/extensions

    Because of the different bundle identifiers, they have different containers.

    Can someone let me know how to limit the same application and its plugins to the same folder location. Does perform a work around for this problem.

    Hello yuktikapahwa,

    See the Sandbox Apple Guide under the ApplicationDirectory group container

    You must create a group that your container can access. I'm not 100% certain that this will work with extensions of Finder, but it seems the most logical place to start.

  • Receiver 907 cod invalid after UpdateJad on the main application and library

    Hello world

    To distribute my BlackBerry live app (OTA) in the past, I would pack my main application, MyApp, and package a linked library application, MyLibrary, containing the main application resources separately.  I then copy the JAD/COD in demand for library files in the same directory as the JAD/COD of the main application files and run UpdateJad.exe on MyApp.jad and MyLibrary.jad.  At this point, I would download all the files on my web server (with the correct .htaccess file) and I could download my application on devices without problem.

    It was some time ago (one or two years).  Now, I'm updating my app and try to do it again.  However, I noticed that when I have my main application, Eclipse generates files JAD/COD for BOTH the application of the library AND the main application in the same directory of the main project of the application (deliverables > Web > 7.1.0).)  I don't think what happened in the past.  This directory contains now:

    • COD for MyApp files
    • Files of COD to MyLibrary
    • MyApp.jad
    • MyLibrary.jad
    • MyApp_full.jad (I don't remember this being produced in the past, either)

    Now, I tried to download my application in several ways, and each way gives an invalid "907 COD: error

    • Download the generated directory-is (and trying to download MyApp.jad AND MyApp_full.jad)
    • UpdateJad.exe running on MyApp.jad and MyLibrary.jad
    • UpdateJad.exe running on MyApp_full.jad and MyLibrary.jad
    • Only copies files from the generated directory MyApp and combining them into a new directory with the generated files to the separate project MyLibrary, packed (and UpdateJad.exe running on MyApp.jad and MyLibrary.jad)
    • etc... I tried practically all combinations.

    But nothing works!  However, if I install the application via MyApp.alx via BlackBerry Desktop Manager, it works.  Anyone know what could be going on here?

    Thank you!

    Hi peterstrange,

    I think I solved the problem.  I realized that I had problems downloading files on my Web server over the last two days with my standard FTP clients.  Once I downloaded the JAD/COD files to another web server, the download and the installation worked without problem (using MyApp_full.jad).

    I appreciate your prompt response to help!

  • Best practices with regard to adding list SkinnablePopUp from the main application file from A Mobile

    Hello

    I want to display a SkinnablePopUp when the user presses the back key when the current view is the first view to ask if he wants to quit.

    Logic (check if the key pressed is the previous key & & the current view is the first) is in the main file of the application and if these two conditions are true, then the exit() method is called.

    I want to show the confirmation popup. Can I move everything in the first pane view mxml or is - it OK to instantiate the SkinnablePopUp in the main application file?

    Thank you.

    its probably best to do principal in the view

    using mvc or mvp you would hold a script to a minimum in sight, just inject the presenter

  • listening in the main application for event from custom component

    I have a component that custom im using an identifier.  I watch videos and tutorials on how to pass variables between applications and custom components. the problem im having is that tutorials or explanation you put the event on the custom component and then it refers to a function in the main application.

    Is a fair way to listen on the main application at the event begins? Ive been tempting for hours and I know there must be something im missing may not be so difficult. any help, I would be really grateful.

    Thank you

    Miguel

    Hello

    The following example has been done as a simple demonstration of States, but the connection (state1) component, is a simple custom event which is sent by the ok button on the connection, the event could be extended to transfer the information to connect to the main application, in this case because the login screen is always public vars or fields of the box would be available for the main application anyway.

    http://gumbo.flashhub.NET/Wizard/ source included

    David.

  • Is the main application "placement?"

    I'm working on a login / my request timeout article. It works very well where clicking on the person of a connection box if they are inactive, but I can't seem to get the application to recognize activities. I am trying to register for these events, but they do not seem to work.

    The main application is always the scene? Something like:
    public void initApp(): void {}
    If (stage! = null)
    {
    stage.addEventListener (MouseEvent.MOUSE_MOVE, handleUserActivity);
    stage.addEventListener (MouseEvent.CLICK, handleUserActivity);
    stage.addEventListener (KeyboardEvent.KEY_DOWN, handleUserActivity);
    }
    }

    The scene must be non-null when the applicationComplete event is dispatched, so try:

    TS

  • Set the main application of labels preloader

    Hello

    Is there a way to change the label on the main application preloader that says "Loading" and "init"?

    Thank you.

    Yes it was!

    It is not easy to see.

    Thank you!!!

  • Newbie question for the Oracle application server

    Hi Master,
    a DBA I am interesting to broaden my skill with learning on the application server.
    I knew that in the past before Weblogic bought by Oracle, Oracle, always using Oracle application server.
    Now with the Weblogic gaining more popularity on the market, which is the product the value of learning and get certified.

    Is it still useful to take Application Server 10 g or go with Weblogic. in certification path, Weblogic 10 g.
    WebLogic now replaces the Oracle application server, average abandoned Oracle Application Server?

    Please enlighten me and thank you for your help

    Lie

    Question if I go for Oracle WebLogic Server 10 g Administrator Certified Expert System it will be good to work with 11g thus?

    Make it part of the same system (now). Like WebLogic is the portal and the Jukebox, forms etc. are the records.

    What book other than the documentation that you have found the right one for learning.

    Yet to find one, Oracle documentation was OK.

    Is it better to learn the Linux or Windows version?

    Both are very well, choose the operating system you know better.

    Best regards

    mseberg

    I built my Middleware on Linux 64-bit test. Note that the 32-bit version allows to run Forms and Reports Developer.

    Beware of pre-installation tasks

    Install the Oracle database
    Linux RCU (repository creation utility)

    Database

    Use an existing database. (And it worked)

    My test was divided into four main parts: (in this order)

    Installation of the regional coordination unit
    WebLogic Server Install
    Install JRocket
    Forms and reports Install

    According to me, it took me two or three times to do things. (or at least work)

    I found myself with these URLs in the end:

    Administration Server Console http://Host/console 7001
    Enterprise Manager Console http://Host/em 7002
    Enterprise Manager Agent http://Host/emd/main
    Oracle Forms http://Host/formes/frmservlet 9001
    Oracle reports http://Host/rapports/rwservlet 9002

    So far, I have only an addition to my Web Page:

    http://www.Visi.com/~mseberg/compile_forms_on_wl.html

    As always this work orders:

    ./opmnctl status
    

    I was able to add PHP after you apply the hotfix 9292625.

    Note of Oracle that I found useful

    854117.1

    Published by: mseberg on May 20, 2011 14:16

  • The main Application of loading and unloading component

    I want to load in my main application 2 components. Right now I have load with this:

    < components: loadProject id = "loadPrj" visible = "false" click = "loadPrj_clickHandler (event)" red = horizontalCenter '7' = "0" / > "

    and I put only visible to true. Inside this component, there is a canvas.

    But is there another way to do it using a class AS file? I want to load/unload on click, not only the value true or false visible.

    You might miss the import instructions.  Code hinting will offer classes

    that you have not imported.

  • How to access the methods and properties of the main document class

    How can I access methods and properties of the class of main document of other classes?
    Can someone give me a clue what I'm doing wrong?

    I use ActionScript3 in Flash CS3 with strict error checking on. I have an application with several custom classes:

    1. the MainMovie class is associated with the document.

    2. the SomeMovieClip class is associated with a movie clip symbol in the library and an instance of the symbol is placed on the main timeline.

    Compilation Flash returns this error message: "1061: call to a method may not set [name of the method here] through a reference with static type flash.display:DisplayObject.".

    I get the same error if I replace the undelined above with this code:

    root.gotoAndStop ("aFrameLabel");


    If I replace the same code simply with:

    trace (root)

    Flash returns [object MainMovie], which tells me that it recognizes the document class.

    However, if I turn the strict error checking, the compilation ends and the movie works as expected in all cases.

    root cast as a movieclip.

  • Execution of function in the main Application component

    Hi all.

    I have my main.mxml application, with a component inside.  The component is called < ns1:record / > wearing the id "rec".

    This component has a function named doConnect(event:MouseEvent) inside.

    Now, I want to be able to add an event listener to a button on the Main.mxml that will perform the function inside the item when you click on it.

    I managed to add an event listener to the Main.mxml that triggers a function which is held in the Main.mxml when a button clicked inside the element is clicked.

    I did it using this code.

                <ns1:record id="rec" x="9" y="6" camera="{camera}" microphone="{microphone}" creationComplete="makeEvent()">
                </ns1:record>

     

                //Event listener
                public function makeEvent():void {
                    rec.backbtn.addEventListener(MouseEvent.CLICK,swapstate);
                }
                protected function swapstate(event:MouseEvent):void {
                    viewstack1.selectedChild=config;
                }

    No matter what I try you can't get do this the other way around.

    I need help what - by clicking on a button in the Main.mxml to perform a function within the Record element.

    If anyone can help that would be great!

    Thanks in advance.

    Hi djh88ukwb,

    From your post if I understand you correctly, you want to listen for an event by calling record when a main mxml button is clicked... on this basis

    hypothesis, I propose you a solution...


    http://www.Adobe.com/2006/mxml"layout ="absolute"creationComplete =" onCreationComplete () ">"

        
    private void onButtonClicked(event:MouseEvent):void
    {
    Rec.swapstate (Event);
    }
    ]]>



    public void swapstate(event:MouseEvent):void {}
    viewstack1.selectedChild = config;
    }

    Please try this and let me know...

    Thank you

    Jean Claude

  • How to set the value of something in a component of the main application?

    Hello

    Maybe I've worked on it too long, but I can't understand how to set the value of the text property of a text entry field in my main application component in a block of mx:Script. I have a component called Login in the components folder, and I need to set the text value of empNum. In my statement of mxml up there, I said these components such as xmlns = "components.*" so, logically, the property, I'm putting a c.Login.empNum.text. I can't understand the correct syntax to make this work, and I've tried everything I can think of. Does anyone have any suggestions? I think this should be easy, and there is just something missing me.

    Thank you!
    Holli

    Have you tried to give him an id?

    If later you can make the loginScreen. empNum.text = "my text".

    Laurent,

  • Invoke the main application of anternate entry point

    I have an application will listen for sms entering a particular port. I added an entry point of anternate to my main project Blackberry XML Descriptor.My method looks like this

    public static void main(String[] args) {
    
            if ( args != null && args.length > 0 && args[0].equals("gui") ){
                // Keep this instance around for rendering
                // Notification dialogs.
                if (theApp == null) {
                    // Start a new app instance for GUI operations.
                 MyApp appMain = new MyApp();
                    appMain.enterEventDispatcher();
                }
           } else {
               BackgroundApplication backApp=new BackgroundApplication();
               backApp.setupBackgroundApplication();
               backApp.enterEventDispatcher();
           }
        }
    

    The problem is that with this logic, my background application would be able to listen to incoming sms, but my application does not open when I click on the application icon in the home screen. If I exchange the conditions that the app opens but BackgroundApplication does not. Help, please.

    You can set the parameter of the appropriate project. the user interface needs the args "gui".

  • How to operate the main thread class when PopupScreen is pushed?

    Hi all

    I created shortcut menu custom in my Application. When you click the button, it shows correctly.

    But in my main screen I used webservice. The screen content is watch depends on webservice respons.

    My problem is that when I click on the popup button comes but threat to webservice conversation stops its execution because because of the pop-up screen my screen becomes not developed for execution. and when I remove my mainclass popup screen takes over its performance and result either appears correctly.

    Please, someone tell me how could it be that in the presence of pop-up screen that my thread to call Webservice will be run?

    The approach that I said is the exact stated, so my suspicion is that you have not implemented correctly.

    Here's a way to test.  Add this code in any code that you are is not executed on the event Thread:

    if ( Application.isEventDispatchThread() (
    
    Dialog.alert("Oppsss, this code should not be running on the Event Thread");
    
    }
    

    Of course if you see the dialog box, so that the code runs on the event Thread.

    If you do not, then validate your code, maybe we can find out what you did wrong.

  • 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.

Maybe you are looking for

  • El Capitan loaded and running, but does not restart after it turns off

    I just downloaded El Capitan and installed on my iMac which was under Snow Leopard 10.6.8. There are 12 GB ram, and this is a 2009 end clocked at 3.06 Ghz version. The installation went well and it ran OK, everything seemed normal.  The problem came

  • Why more than 90% of the functions of YouTube no longer work on Firefox?

    For a week, everything I try to do on YouTube with Firefox has been extremely slow, sometimes similar to a dial-up connection. I tried to use all three browsers - IE8, Firefox, and Chrome - and the problem seems to be ONLY with Firefox. In fact, with

  • HP Envy 15 Notebook PC: Can I download Driver

    I have a laptop HP Envy 15, with an I7-4510U processor and a Nvidia GeForce 850 M with 4 GB memory and 1920 by 1080 touchscreen.  I see that Intel has released a new 64-bit driver https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y & DwnldID = 24

  • Cannot get the DV6 recovery disk to run.

    I have a Pavilion DV6 2110ea.I just set up a new hard drive.I wanted a new installation of the operating system without all the extras of HP. So I downloaded the correct version of Windows 7 which was pre-installed when I bought the laptop (Home Prem

  • Pavilion dv4-1431us: hp pavilion keyboard and mouse

    I'm trying to update my laptop after not having used it a while - my daughter has used only listen to Spotify. Windows 10 previously installed. The keyboard and mouse on this laptop have stopped working. I used a wireless keyboard and a mouse who wor