Name
AlertType
Synopsis
This is a class that provides a set of type-safe constants that are used to
specify the type of an Alert. The
AlertType provides a hint to the platform as to how it
should render the Alert and typically causes an appropriate
icon to be included along with the application-supplied message. On devices
that have a sound capability, a sound (which might be type-dependent) may also
be played when the alert is displayed.
The playSound() method may be used to play the sound
associated with the AlertType, even when no
Alert is displayed. Since not all devices will be able to
play sounds, the playSound() method returns a boolean
indicating whether a sound was produced, to allow the application
to use an alternate mechanism to attract the user’s attention if sound is
not available.
public class AlertType { // Protected Constructors protected AlertType(); // Public Constants public static final AlertType ALARM; public static final AlertType CONFIRMATION; public static final AlertType ERROR; public static final AlertType INFO; public static final AlertType WARNING; // Public Instance Methods public boolean playSound( Display display); }
Passed To
Alert.{Alert(), setType()}
Returned By
Alert.getType()
Type Of
AlertType.{ALARM, CONFIRMATION, ERROR, INFO, WARNING}
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access