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
nurikabe
Posts: 44
Registered: ‎08-20-2008
My Device: Not Specified
Accepted Solution

Difference between ApplicationManager.scheduleApplication and PushRegistry.registerAlarm?

Poking around for some information but can't seem to find any.  Is there any significant difference between BlackBerry's scheduleApplication and the javax registerAlarm?  With either of these is there a way to tell that the was launched from the platform rather than user-initiated?

 

Thanks.

 

Please use plain text.
Administrator
MSohm
Posts: 14,296
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Difference between ApplicationManager.scheduleApplication and PushRegistry.registerAlarm?

PushRegistry is designed to be used by a MIDlet application.

 

Applicationmanager.scheduleApplication is designed to be used by BlackBerry CLDC applications.  You can create an application with alternate entry points and have the scheduleApplication launch a specific one.  You can use this to tell whether the application was launched by the user by clicking on the icon on the home screen or by the scheduleApplication method.  The following link explains how to create an alternate entry point.

 

How To - Setup an alternate entry point for my application
Article Number: DB-00008

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800901/How_To_...

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
Please use plain text.
New Developer
nurikabe
Posts: 44
Registered: ‎08-20-2008
My Device: Not Specified

Re: Difference between ApplicationManager.scheduleApplication and PushRegistry.registerAlarm?

Excellent, thanks!  Sorry for the newbie question, but what are the advantages/disadvantages of creating a BlackBerry CLDC app versus a midlet?

 

Please use plain text.
Administrator
MSohm
Posts: 14,296
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Difference between ApplicationManager.scheduleApplication and PushRegistry.registerAlarm?

A MIDlet is portable to other J2ME devices, where a BlackBerry CLDC application is not.

 

A BlackBerry CLDC application allows for the user of some BlackBerry specific APIs that allow for things such as:

 

Background processing (application can run in the background).

BlackBerry user interface (more closly resemble the built in BlackBerry applications and allows for more customization than a MIDlet).

 

Many of the APIs can be intermixed between the two types of applications with the exception of user interface classes and the MIDlet, Application and UiApplication classes.

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
Please use plain text.
New Developer
nurikabe
Posts: 44
Registered: ‎08-20-2008
My Device: Not Specified

Re: Difference between ApplicationManager.scheduleApplication and PushRegistry.registerAlarm?

Got it.  Thanks!
Please use plain text.
New Developer
nurikabe
Posts: 44
Registered: ‎08-20-2008
My Device: Not Specified

Re: Difference between ApplicationManager.scheduleApplication and PushRegistry.registerAlarm?

One more follow-up question:

 

Will the PushRegistry launch events for midlets that the user has exited?  Or do the midlets have to be running in the background?

 

Please use plain text.
Administrator
MSohm
Posts: 14,296
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Difference between ApplicationManager.scheduleApplication and PushRegistry.registerAlarm?

MIDlets are not able to run in the background.  The PushRegistry should start the application when an alarm fires.
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
Please use plain text.
Developer
ianstrain
Posts: 62
Registered: ‎07-15-2008
My Device: Not Specified

Re: Difference between ApplicationManager.scheduleApplication and PushRegistry.registerAlarm?


MSohm wrote:

You can use this to tell whether the application was launched by the user by clicking on the icon on the home screen or by the scheduleApplication method. 


How do you do this? I need to find out if the user started the application or if is was started using scheduleApplication

Please use plain text.
Administrator
MSohm
Posts: 14,296
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Difference between ApplicationManager.scheduleApplication and PushRegistry.registerAlarm?

Please see the link to "How To - Setup an alternate entry point for my application" in my previous post for the steps on setting this up.
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
Please use plain text.