Home > Language Reference > Classes > Application

RegisterNotify Method

Registers a notification request.

Syntax

Public Sub RegisterNotify(ByVal eNotify As HbNotify, Optional ByVal iPriority As Integer = 0, Optional ByVal lUserData As Long = 0)

ParameterDescription
eNotifyType of notification to register for.
iPriorityNotification priority.
lUserDataCustom data that will be passed along with the Notify event.

Remarks

This method registers a request for notification. The eNotify argument specifies the event for which your application should be notified, and should be one of the following constants:

Constant Value Description
hbNotifySyncStartEvent&H686F7473This notification is sent just before a synchronization operation starts.
hbNotifySyncFinishEvent&H73796E63This notification is sent just before a synchronization operation ends.
hbNotifyAntennaRaisedEvent&H74656E61This notification is sent on the Palm VII™ when the antenna is raised.
hbNotifyResetFinishedEvent&H72737466This notification is sent after all app launchcodes are sent after a reset.
hbNotifyForgotPasswordEvent&H626F7A6FThis notification is sent after the user clicks on the "Lost Password" button in the application Security, and confirms the suppression of all private records.
hbNotifySecuritySettingEvent&H73736368This notification is sent when the security setting is changed either by the user in the Security application or programmatically.
hbNotifyTimeChangeEvent&H74696D65This notification is sent after the current time has been modified.
hbNotifySleepRequestEvent&H736C7071This notification is sent when the device is about to go to sleep, and is a chance for clients to do perform an action or even delay going to sleep for a little while. This may be broadcast multiple times if one or more clients defer the sleep. The objParams parameter contain a SleepEventParamType type structure (Notify Launch code) (1).
hbNotifySleepNotifyEvent&H736C7021This notification is sent just before the device is switched off. It is recommended to not start any time consuming operations or open any dialog boxes when this event is received.
hbNotifyEarlyWakeupEvent&H776F726DThis notification is sent when the device is started up. The screen may still be off and the system only partially available. It is better to use the hbNotifyLateWakeupEvent notification if you want to be informed when the device has been started.
hbNotifyLateWakeupEvent&H6C617A79This notification is sent when the device has started.
hbNotifyDisplayChangeEvent&H73637264This notification is sent when the current graphics mode is changed.
hbNotifyMenuCmdBarOpenEvent &H63626172This notification is sent before a command bar is displayed. The system will not open the toolbar if the bHandled parameter of the Notify Launch code is set.
hbNotifyProfileEvent&H636E6370This notification is sent by the Connection Panel to inform its clients that the current configuration has changed.
hbNotifyExternalConnAttached&H65636E61This notification is sent when anything is attached to the external connector.
hbNotifyExternalConnDetached&H65636E64This notification is sent when anything is detached from the external connector.
hbNotifyCardInsertedEvent&H63726469This notification is sent when a card is inserted into a slot.The system will play a sound & attempt to mount a volume unless the corresponding bits* in the bHandled parameter are set by a notification handler (Notify Launch code)
hbNotifyCardRemovedEvent&H6372646FThis notification is sent when a card is removed from a slot.The system will play a sound & attempt to unmount a volume unless the corresponding bits* in the bHandled parameter are set by a notification handler (Notify Launch code).
hbNotifyVolumeMountedEvent&H766F6C6DThis notification is sent when a volume is mounted. The system will run start.prc (if present) or the Launcher unless the corresponding bits* in the bHandled parameter are set by a notification handler (Notify Launch code).
hbNotifyVolumeUnmountedEvent &H766F6C75This notification is sent when a volume is unmounted. The system will delete start.prc (if it was loaded).
hbNotifyHelperEvent &H686C7072This notification is sent by Address Book (or any 3rd party application) to communicate with Phone Apps.
hbNotifyPOSEMountEvent &H706F7365This notification is sent by HostFS to communicate with itself saving on stack depth.
hbNotifyLocaleChangedEvent &H6C6F6363This notification notify apps/panel that the system locale has changed. This is broadcast by the language picker after it has changed the locale. The objParam parameter contain a SysNotifyLocaleChangedType type structure (Notify Launch code) (1).
hbNotifyRetryEnqueueKey &H7265746BAn EvtEnqueueKey failed, so retry *.
hbNotifyGotUsersAttention&H6174746EThis notification is sent when the Attention Manager has finished displaying or sounding its attention indicators (blinking, playing sounds, vibrating, and so on). You can register for this notification if you want to perform some extra effect or if they simply want to be informed of when the user's attention was received. (1)
hbNotifyDBDeletedEvent &H6462732DThis notification is sent sometime after a database is removed from the device. Register for this notification if you keep an internal list of databases that needs to be updated upon removal of a database. For example, the Attention Manager and Connection Manager register for this notification to maintain their internal lists of databases.(3)
hbNotifyDBCreatedEvent &H64626372This notification is sent sometime after a database is created. Register for this notification if you keep an internal list of databases that needs to be updated when a new database is created.
hbNotifyDBChangedEvent&H64626D6EThis notification is sent sometime after database info is changed.
hbNotifyDBDirtyEvent&H64626472This notification is sent sometime after a database is opened for write or in some other way has been made modifiable. Note that the database may not have actually been modified yet. Register for this notification if you keep an internal list of databases that needs to be updated when a database becomes 'dirty'. For instance, upon reset the Launcher normally checks over such databases and updates its internal list.
hbNotifyDeviceUnlocked&H756E6C6BThis notification is sent by the Security application when the user unlocks the device. The notification is sent immediately after the device has finished unlocking.If you display UI in response to the hbNotifyLateWakeupEvent notification, you should also register to receive the hbNotifyDeviceUnlocked notification. When a locked device receives the hbNotifyLateWakeupEvent, your UI should not be displayed if the device is waiting for the user to enter the password. This notification is broadcast after the password is entered, which indicates that the user interface is ready.
hbNotifyPhoneEvent&H666F6E65This notification is sent by third-party applications to communicate with built-in or external phones. (Note that this event is for future use)
hbNotifyNetLibIFMediaEvent&H6E657469The notification is at whenever the network interface makes the network connection active or inactive. The Network Panel uses this notification to decide whether the Connect button should be active. Register for this notification if you need to know when the network connection is currently active. (1)
hbNotifyDeleteProtectedEvent &H2D706462This notification is sent when the Launcher attempts to delete a database that has the protected flag set. The Launcher broadcasts the notification and then attempts to delete the database again. Any third party application that deletes databases should broadcast this notification as well. Register for this notification if you have a protected database but you still want to allow users to delete your application or other code resource if they choose. A notification handler should check the information in the structure* received for this notification in the objParams parameter of the Notify Launch code to see if its database is the one being deleted. If so, it should respond to this notification to perform any necessary cleanup and to clear the protected flag. In this way, when the Launcher attempts to delete the database again, it will succeed. Note that if an application has multiple protected databases, this notification may be sent out more than once.
hbNotifyProcessPenStrokeEvent &H68707073This notification is sent to enable custom recognition of strokes on the system area of the digitizer (buttons, etc.) (2).
hbNotifyVirtualCharHandlingEvent&H68766368This notification is sent to enable custom handling handling of virtual chars.(2).
hbNotifyEventDequeuedEvent&H68656465This notification is sent for each event being returned by EvtGetEvent. Be very careful about registering for this; you can easily slow down the device. For speed, objParams (Notify Launch code) (1) contain a event structure with system-native endianness, meaning you might need to byte-swap what you read depending on what endianness your code uses. (2)
hbNotifyIdleTimeEvent &H6869646CThis notification is sent when the system is idle and is about to doze.
hbNotifyAppLaunchingEvent&H6861706CThis notification is sent before an applicatiob is launched (normalLaunch only). (2)
hbNotifyAppQuittingEvent&H68617071This notification is sent right after an app has quit (normalLaunch only). (2)
hbNotifyInsPtEnableEvent &H68697065This notification is sent when insertion point is being enabled or disabled. The objParams parameter contain a Boolean that allow to retreive or change the insertion point status. Note: future OS releases might not send this notification.
hbNotifyKeyboardDialogEvent &H686B6264The keyboard dialog is about to be displayed. The objParams parameter (Notify Launch code) contain a KeyboardType. structure (1)(2).
hbNotifyDisplayResizedEvent&H73637273This notification is sent when the Dynamic Input Area status change. The objParams parameter ( Notify Launch code) contain a SysNotifyDisplayResizedDetailsType cstructure. (1) Warning: trapping this notification when one of your project forms had its DIA property set to 'Enabled' may lead to impredictible results and is strongly discouraged.
hbNotifyInputAreaDrawingEvent &H69616164This notification is sent when right before the Dynamic Input Area is drawn. If the notification is handled, the system assumes that the requested portion of the input area has been redrawn and skips its own drawing code. The objParams parameter ( Notify Launch code)contain a SysNotifyInputAreaDrawingDetailsType structure. (1)(2)
hbNotifyInputAreaPendownEvent&H69617064This notification is sent when a pen-down has occurred in the input area. If the notification is handled, further pen-down processing is skipped. The objParams parameter (Notify Launch code) contain a SysNotifyInputAreaPendownDetailType structure. (1)(2)
hbNotifySelectDay&H73656C64This notification is sent when the system needs to request that the user pick a particular date in the calendar. If the notification is handled, further UI is skipped. The objParams parameter ( Notify Launch code) contain a SysNotifySelectDayDetailsType structure. (1)(2)
hbNotifyGsiDrawIndicator&H67736964This notification is sent when the the system is about to draw the Graffiti shift indicator. If the notification is handled, further drawing is skipped. (2)

(1) Refer to the PalmSource © SDK for more informations on the structure received for this notification in the objParams parameter of the Notify Launch code.
(2) Future OS releases might not send this notification.
(3) These hbNotifyDBxxxEvent notifications are deferred notifications. So, for instance, if your application creates a database, opens it for write, and then renames it, all before EvtGetEvent is called, the three corresponding notifications will all go out together. A sysNotifyDBDirtyEvent handler would fail if it tried to open the database, since the database will already have been renamed. You must be aware of the ramifications of a deferred notification when writing your notification handler.

The iPriority parameter let you specify with which priority the application should receive the event. Most applications and other code resources should always use a normal priority (0). In rare circumstances, you may need to ensure that your code is notified toward the beginning or toward the end of the notification sequence. If so, be sure to leave some space so that your code won't collide with the system's handling of notifications or with another application's handling of notifications. The smaller the priority, the earlier your application is notified.

You can call this method as many times as necessary by specifying a different value for the eNotify parameter if you want to receive several different notifications. You can also cancel a notification demand using the UnregisterNotify method.

When the event occurs, your application is launched with a Notify event. The value of the SubCall property tells you if your application was already active at this moment.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0-
Windows CEWindows CE 3.0-