An AudioTime object represents a time to be "spoken" to the user.
The AudioTime class has a value property, in
the form of a java.util.Calendar object, which represents
the time, and a timeZone property which represents the
time zone of the AudioTime object.
The style property, inherited from the superclass MediaType, has only one value for an AudioTime object.
This default value speaks the time in hours and minutes, using the 12–hour
or 24–hour clock depending on the locale property
(also inherited from MediaType).
The constructor methods for this class are:
- AudioTime()
- Constructs a "current-time" AudioTime object. The time zone
is taken from the default time zone of the Java virtual machine (JVM). You
can set the properties of the AudioTime class later using the methods setValue() and setTimeZone().
- AudioTime(java.util.Calendar calendar)
- Constructs an audio time using the specified Calendar object.
The time zone of the AudioTime object is set to the time zone of
the Calendar object.
- AudioTime(java.util.TimeZone tz)
- Constructs a "current-time" AudioTime object with adjustment
for a specified time zone. For example, if the time at which the AudioTime is spoken is 2300 hours universal time (UT), and the time zone specified
is UT+2, then the time value spoken will be 0100 hours.
For example:
public class InApp extends WVRApplication {
// Create an audio time
public AudioTime now = new AudioTime(Calendar.getInstance());
.
.
.
}