Difference between revisions of "Notification:setSound"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === Sets the sound which is played when notification is shown. By default no sound is played and if you w...") |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Available since:''' Gideros 2011.6<br/> | + | <languages /> |
− | === Description === | + | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> |
− | Sets the sound which is played when notification is shown. | + | '''<translate>Class</translate>:''' [[Special:MyLanguage/Notification|Notification]]<br/> |
+ | === <translate>Description</translate> === | ||
+ | <translate>Sets the sound which is played when notification is shown. | ||
− | By default no sound is played and if you want to play default system sound, then you can use | + | By default no sound is played and if you want to play default system sound, then you can use [[Special:MyLanguage/Notification.DEFAULT_SOUND|Notification.DEFAULT_SOUND]] constant |
For cross-platform compatability it is better to use .wav file types. | For cross-platform compatability it is better to use .wav file types. | ||
Line 10: | Line 12: | ||
For IOS the audio length can not exceed 30 seconds | For IOS the audio length can not exceed 30 seconds | ||
− | You can reference this <a href='https://developer.apple.com/library/IOs/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html' target='_blank'>IOS notification guide</a> for converting sound to needed formats on IOS. | + | You can reference this <a href='https://developer.apple.com/library/IOs/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html' target='_blank'>IOS notification guide</a> for converting sound to needed formats on IOS.</translate> |
− | < | + | <syntaxhighlight lang="lua"> |
− | + | Notification:setSound() | |
− | </ | + | </syntaxhighlight> |
Latest revision as of 14:32, 13 July 2023
Available since: Gideros 2011.6
Class: Notification
Description
Sets the sound which is played when notification is shown.
By default no sound is played and if you want to play default system sound, then you can use Notification.DEFAULT_SOUND constant
For cross-platform compatability it is better to use .wav file types.
For IOS the audio length can not exceed 30 seconds
You can reference this <a href='https://developer.apple.com/library/IOs/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html' target='_blank'>IOS notification guide</a> for converting sound to needed formats on IOS.
Notification:setSound()