java.lang.Object | |
↳ | android.media.Ringtone |
Ringtone provides a quick method for playing a ringtone, notification, or other similar types of sounds.
For ways of retrieving Ringtone
objects or to show a ringtone
picker, see RingtoneManager
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the
AudioAttributes used by this object.
| |||||||||||
This method was deprecated
in API level 21.
use of stream types is deprecated, see
setAudioAttributes(AudioAttributes)
| |||||||||||
Returns a human-presentable title for ringtone.
| |||||||||||
Whether this ringtone is currently playing.
| |||||||||||
Plays the ringtone.
| |||||||||||
Sets the
AudioAttributes for this ringtone.
| |||||||||||
This method was deprecated
in API level 21.
use
setAudioAttributes(AudioAttributes)
| |||||||||||
Stops a playing ringtone.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Returns the AudioAttributes
used by this object.
AudioAttributes
that were set with
setAudioAttributes(AudioAttributes)
or the default attributes if none were set.
This method was deprecated
in API level 21.
use of stream types is deprecated, see
setAudioAttributes(AudioAttributes)
Gets the stream type where this ringtone will be played.
AudioManager
.Returns a human-presentable title for ringtone. Looks in media content provider. If not in either, uses the filename
context | A context used for querying. |
---|
Whether this ringtone is currently playing.
Sets the AudioAttributes
for this ringtone.
attributes | the non-null attributes characterizing this ringtone. |
---|
IllegalArgumentException |
---|
This method was deprecated
in API level 21.
use setAudioAttributes(AudioAttributes)
Sets the stream type where this ringtone will be played.
streamType | The stream, see AudioManager . |
---|