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
Regular Contributor
Posts: 66
Registered: ‎09-06-2011
My Device: 9930
My Carrier: 9930

is auto run on start up in app_descriptor checkbox sign?

HI

               i want my app to run at boot up. i am checking auto run on start up in app_descriptor. and deploying the app on device but my app is not getting started. i want to that does this check box comes under sign API?

BlackBerry Development Advisor
Posts: 15,696
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: is auto run on start up in app_descriptor checkbox sign?

Auto-start applications do need to be signed.  Have you signed the application?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Regular Contributor
Posts: 66
Registered: ‎09-06-2011
My Device: 9930
My Carrier: 9930

Re: is auto run on start up in app_descriptor checkbox sign?

[ Edited ]

thanks for reply

                                 i have signed my application. application is not starting at boot up though i check the auto run on start up.

do i  need to also check system module if yes pls post me the steps to do it.  because i am not fiinding how to deal with it.

Developer
Posts: 16,986
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: is auto run on start up in app_descriptor checkbox sign?

no need for system module.

does your app start without the autostart flag?

maybe the init process is not done, you can add something along these lines in your static main:

ApplicationManager app = ApplicationManager.getApplicationManager();
while (app.inStartup()) {
try {
Thread.sleep(400);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Regular Contributor
Posts: 66
Registered: ‎09-06-2011
My Device: 9930
My Carrier: 9930

Re: is auto run on start up in app_descriptor checkbox sign?

Actually, there is no Ui in my app it should keep runnig in background after phone boot up does ApplicationManager do that. if no pls let me know how can i start my app at phone boot up and keep running it in background till the device switch off.   

BlackBerry Development Advisor
Posts: 15,696
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: is auto run on start up in app_descriptor checkbox sign?

Depending on the user's application control settings, your application may trigger a prompt to the user to allow access to the phone.  If the BlackBerry Smartphone is still starting up and unable to display a GUI, this will fail.

 

You can use the technique Simon mentions to ensure that you don't register the PhoneListener until the device is ready to show a GUI.

 

You can view your application control settings by going to Options, Applications, selecting your application and choosing Edit Permissions from the menu.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Regular Contributor
Posts: 66
Registered: ‎09-06-2011
My Device: 9930
My Carrier: 9930

Re: is auto run on start up in app_descriptor checkbox sign?

HI M sohm,

                       Actually i am coding a message listener which on recieve message start one background service. but i want to initialize this service at phone boot up i had tried the method mention by simon but when i debug my applicationusing application manager class my thread get suspended. so can u pls help me sort out this.

 

BlackBerry Development Advisor
Posts: 15,696
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: is auto run on start up in app_descriptor checkbox sign?

Can you elaborate?  Does it stay stuck in that loop, crash with an exception or block somewhere else?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Regular Contributor
Posts: 66
Registered: ‎09-06-2011
My Device: 9930
My Carrier: 9930

Re: is auto run on start up in app_descriptor checkbox sign?

[ Edited ]

Thanks for reply

         The code is not stucking up in any loop nor it is throwing exception but when i run it ,In debug perspectve of eclipse  app's thread note to be suspended. I want to ask that does i made any mistake in code? or it is suspending due to message listener do not have any message to recieve. OR some other problem.

Attaching the code with snippet.

 

public static void main(String[] args)
    {
       
        ApplicationManager app = ApplicationManager.getApplicationManager();
        while (app.inStartup())
        {
            try
            {
                //if (messageFolder.getType() == Folder.INBOX)
                {
                ReceiveSms RS = new ReceiveSms();
                RS.enterEventDispatcher();
                }

            } catch (Exception e) {
                System.out.println(e);
                e.printStackTrace();
            }
        }
    }

    ReceiveSms()
    {   
        _listener = new ListeningThread();
        //if (messageFolder.getType() == Folder.INBOX)
        {
            _listener.start();
        }


 

BlackBerry Development Advisor
Posts: 15,696
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: is auto run on start up in app_descriptor checkbox sign?

Which thread are you referring to?  The main event thread or ListeningThread?  What does ListeningThread do?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker