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
New Developer
Posts: 21
Registered: ‎10-09-2008
My Device: Not Specified

invokeApplication in a JDE 4.2.1 environment

Dear Forum,

I have a problem using Invoke.invokeApplication in an application in a JDE 4.2.1 environment. My invocation aims at opening a new calendar item.

The following simple code is executed:

Code:
import net.rim.blackberry.api.invoke.CalendarArguments;
import net.rim.blackberry.api.invoke.Invoke;
import net.rim.device.api.ui.UiApplication;


public class OpenNewCalendarItem extends UiApplication {
public static void main(String[] args) {
new OpenNewCalendarItem().enterEventDispatcher();
System.exit(0);
}

public OpenNewCalendarItem() {
super();
Invoke.invokeApplication( Invoke.APP_TYPE_CALENDAR, new CalendarArguments( CalendarArguments.ARG_NEW ));
}
}
The new agenda item is correctly opened BUT after this opening, it is impossible for the end-user to exit the calendar application: it seems that the device (and simulator) has crashed.

Is it a defect? Is there a workaround?

Thank you again for your precious support,

Mikaël Donini.
Highlighted
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: invokeApplication in a JDE 4.2.1 environment

Try moving your System.exit call from your main method into the application's constructor.

 

If this doesn't change the behaviour, can you describe what the user see's?  Are they unable to exit the Calendar or do you see a blank white screen?  Can you task switch (Alt+Escape) out of your 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