Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 73
Registered: ‎05-03-2011
My Device: 9550
My Carrier: verison
Accepted Solution

why appliction autostarted has no command argument ?

I have developed a application, I want to use alter entry, so copy the code in notificationDemo sample like below:

 

public static void main( String[] args )
    {
        if( args.length > 0 && args[ 0 ].equals( "autostartup" ) )
        {
            NotificationsDemo nd = new NotificationsDemo();
            nd.registerNotificationObjects();
            
            // Keep this instance around for rendering
            // Notification dialogs.
            nd.enterEventDispatcher(); 
        }
        else
        {
            // Start a new app instance for GUI operations.
            new NotificationsDemo().showGui();
        } 

I add some code before first if declare, the every time entry the application, the args is empty, I don't know why, any idea? I try to set application autostart option on or off, but not work, the args is still empty.

Author of pairs and Gradient
Developer
Posts: 73
Registered: ‎05-03-2011
My Device: 9550
My Carrier: verison

Re: why appliction autostarted has no command argument ?

[ Edited ]

I have found that the demo argument option has not set to "autostart". is there any other option relate to it?  

Author of pairs and Gradient
Highlighted
Developer
Posts: 73
Registered: ‎05-03-2011
My Device: 9550
My Carrier: verison

Re: why appliction autostarted has no command argument ?

I have found the alter entry setting in eclipse app configuration. I should create a new alter app entry, then add argument "startup".

Author of pairs and Gradient