Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public class MessageEvent
- Object
- ActionEvent
- MessageEvent
See also
Nested types
class MessageEvent.PromptPromise | Encapsulates a promise that should be fulfilled when implementingn a custom permissions prompt to record or play audio. |
Constructors
public MessageEvent(Object source, String message, int code) | Creates a new message. |
Methods
public String getMessage() | Gets the message content. |
public int getCode() | Gets the message code. |
public boolean isPromptForAudioRecorder() | Checks to see if this message is a prompt to record audio. |
public boolean isPromptForAudioPlayer() | Checks to see if this message is a prompt to play audio. |
public MessageEvent.PromptPromise getPromptPromise() | This obtains the “promise” that should be fulfilled if implementing a custom permissions prompt for playing or recording audio. |
Inherited nested types
Inherited methods
Constructor details
MessageEvent
public MessageEvent(Object source, String message, int code)Parameters
sourceObject- The source of the message.
messageString- The message content.
codeint- A code for the message.
Method details
getMessage
public String getMessage()Returns
getCode
public int getCode()isPromptForAudioRecorder
public boolean isPromptForAudioRecorder()Checks to see if this message is a prompt to record audio. This is currently only used in the Javascript port, and it allows you to implement a custom permissions prompt to record audio.
See Displaying Custom Prompt to Play Audio for an example.
Returns
isPromptForAudioPlayer
public boolean isPromptForAudioPlayer()Checks to see if this message is a prompt to play audio. This is currently only used in the Javascript port, and it allows you to implement a custom permissions prompt to play audio.
See Displaying Custom Prompt to Play Audio for an example.
Returns
getPromptPromise
public MessageEvent.PromptPromise getPromptPromise()This obtains the “promise” that should be fulfilled if implementing a custom permissions prompt for playing or recording audio. Currently this is only used for the Javascript port.
See Displaying Custom Prompt to Play Audio for an example.