Version: Smart Feature Phone 2.5



This method is used to allow applications to register a function handler that can receive — and react to — a message from the system.

Any application is allowed to register a handler to receive any message, but some messages will only be delivered to applications that have the corresponding permission. For example, an sms-received message will only be delivered to an application that has the sms permission.

Contrary to DOM events, system messages will stay in the queue even if the application has no handler for them. You can check if your application has queued messages by calling navigator.mozHasPendingMessage() with the appropriate type as a parameter. When a message handler is set, all queued messages will be asynchronously delivered to the application.


navigator.mozSetMessageHandler(type, handler);


  • type - type is a string that represents the registered handler for which a class of messages.
  • handler - when the system sends a message, the handler is called, its reception parameters determined by the message type.

Message types#

Currently KaiOS allows you to register handlers for the following messages:

Message typeHandler signaturePermission
activityf(MozActivityRequestHandler request)
alarmf(object unknown)alarms
bluetooth-cancelf(object unknown)bluetooth
bluetooth-dialer-commandf(object unknown)bluetooth
bluetooth-hfp-status-changedf(object unknown)bluetooth
bluetooth-opp-transfer-startf(object unknown)bluetooth
bluetooth-opp-transfer-completef(object unknown)bluetooth
bluetooth-opp-receiving-file-confirmationf(object unknown)bluetooth
bluetooth-opp-update-progressf(object unknown)bluetooth
bluetooth-pairedstatuschangedf(object unknown)bluetooth
bluetooth-pairing-requestf(object unknown)bluetooth
bluetooth-requestconfirmationf(object unknown)bluetooth
bluetooth-requestpincodef(object unknown)bluetooth
bluetooth-requestpasskeyf(object unknown)bluetooth
headset-buttonf(object unknown)
icc-stkcommandf(object command)settings
networkstats-alarmf(object command)networkstats-manage
notificationf(object unknown)
pushf(object registration)push
push-registerf( )push
sms-receivedf(SmsMessage sms)sms
sms-sentf(SmsMessage sms)sms
telephony-call-endedf(object call)telephony
telephony-new-callf( )telephony
ussd-receivedf(object ussd)mobileconnection
wappush-receivedf(object wappush)wappush
wifip2p-pairing-requestf(object unknown)wifi-manage