12-06-2012 05:08 AM
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
Solved! Go to Solution.
12-06-2012 05:30 AM
That depends. Look for the documentation for that application and this method for more.
12-06-2012 05:33 AM
12-06-2012 05:40 AM
12-06-2012 06:25 AM - edited 12-06-2012 06:45 AM
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 :-)
12-06-2012 06:39 AM
What are you trying to achieve?
12-06-2012 06:47 AM
12-06-2012 08:11 AM
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
12-07-2012 12:39 AM
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());
}
}