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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 81
Registered: ‎12-04-2012
My Device: BlackBerry@8520 smartphone(Edge,Wi-fi)
My Carrier: vodafone
Accepted Solution

getapplicationmanager()

heyy, could someone tell me what am i supposed to put in place the parameters in this method

manager.scheduleApplication(descriptor, time, absolute);

Plz help

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: getapplicationmanager()

That depends.  Look for the documentation for that application and this method for more. 

Highlighted
Developer
Posts: 81
Registered: ‎12-04-2012
My Device: BlackBerry@8520 smartphone(Edge,Wi-fi)
My Carrier: vodafone

Re: getapplicationmanager()

thnxs :-)
Developer
Posts: 81
Registered: ‎12-04-2012
My Device: BlackBerry@8520 smartphone(Edge,Wi-fi)
My Carrier: vodafone

Re: getapplicationmanager()

i am putting my descriptor, but it is giving an error. What am i supposed to put in the descriptor
Developer
Posts: 81
Registered: ‎12-04-2012
My Device: BlackBerry@8520 smartphone(Edge,Wi-fi)
My Carrier: vodafone

Re: getapplicationmanager()

[ Edited ]
package mypackage;

import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.system.ApplicationDescriptor;
import net.rim.device.api.system.ApplicationManager;
import net.rim.device.api.system.ApplicationManagerException;
/**
 * This class extends the UiApplication class, providing a
 * graphical user interface.
 */
public class MyApp extends UiApplication
{
    /**
     * Entry point for application
     * @param args Command line arguments (not used)
     * @param newDescriptor 
     */ 
    public static void main(String[] args, ApplicationDescriptor newDescriptor)
    { 
    	
	   try 
        {  ApplicationManager appmanager = ApplicationManager.getApplicationManager();
		    appmanager.lockSystem(false);
            appmanager.scheduleApplication(newdescriptor, 1728000, false);
        } 
        catch(ApplicationManagerException e) 
        {
            //handle situation when application cannot run
        }
        MyApp theApp = new MyApp();       
        theApp.enterEventDispatcher();
    }
    

    /**
     * Creates a new MyApp object
     */
    public MyApp()
    {        
        // Push a screen onto the UI stack for rendering.
        pushScreen(new MyScreen());
    }    
}
The error is in the highlighted text. I have no clue what to put in the descriptor.I tried puting the name of my xml,but nothing seems to work
I hope i m clear and not disturbing the flow of threads.
Hope i am answered now :-)

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: getapplicationmanager()

What are you trying to achieve?

Developer
Posts: 81
Registered: ‎12-04-2012
My Device: BlackBerry@8520 smartphone(Edge,Wi-fi)
My Carrier: vodafone

Re: getapplicationmanager()

i am trying to make an application which launches itself after a certain allotted time
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: getapplicationmanager()

How is this app going to be started the first time?  auto-start, or will the user start it?

 

Have you looked at this method?

ApplicationDescriptor.currentApplicationDescriptor()

Developer
Posts: 81
Registered: ‎12-04-2012
My Device: BlackBerry@8520 smartphone(Edge,Wi-fi)
My Carrier: vodafone

Re: getapplicationmanager()

I have included this method that u told i want my app to launch lets say after 45seconds after i have clicked on it..I dont want the user to be involved at any level.Could u help ...my code is just an error-free snippet but is not doing anything.

public class MyApp extends UiApplication
{
    /**
     * Entry point for application
     * @param args Command line arguments (not used)
     * @param newDescriptor 
     */ 
    public static void main(String[] args)
    { ApplicationDescriptor template = ApplicationDescriptor.currentApplicationDescriptor();
      String[] args1 = { "admin","secure" };
      ApplicationDescriptor newdescriptor = new ApplicationDescriptor(template, args1);
      ApplicationDescriptor.currentApplicationDescriptor();
      ApplicationManager appmanager = ApplicationManager.getApplicationManager();
	  appmanager.lockSystem(false);
      appmanager.scheduleApplication(newdescriptor, 3728000, false);
      MyApp theApp = new MyApp();       
      theApp.enterEventDispatcher();
    }
    

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