Accengage:自定义通知声音
Accengage: Custom notification sound
作为更改日志3.3.0 Accengage 现在允许程序员自定义通知声音。
Static Lists : Add/Remove and get subscription status for lists of
users In-App/Alarm : Global Capping between distinct messages
In-App/Alarm : Global Delay between distinct messages Push : Custom
notification sound
但是在我研究的过程中,我找不到在哪里可以自定义它。请告诉我如何在 android.
上做
谢谢:)
这样设置通知铃声,
Uri notification1 = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification1);
r.play();
假设您希望为您的通知播放特定的声音,请尝试以下操作
通过调用通知服务并将相关参数传递给它来创建通知对象。
现在在这个通知对象上你必须调用
mynotification.sound 应该是指你要通知播放的MP3文件。
这个 MP3 文件应该在 raw 文件夹中。
看看是否有效
作为更改日志3.3.0 Accengage 现在允许程序员自定义通知声音。
Static Lists : Add/Remove and get subscription status for lists of users In-App/Alarm : Global Capping between distinct messages In-App/Alarm : Global Delay between distinct messages Push : Custom notification sound
但是在我研究的过程中,我找不到在哪里可以自定义它。请告诉我如何在 android.
上做谢谢:)
这样设置通知铃声,
Uri notification1 = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification1);
r.play();
假设您希望为您的通知播放特定的声音,请尝试以下操作 通过调用通知服务并将相关参数传递给它来创建通知对象。 现在在这个通知对象上你必须调用 mynotification.sound 应该是指你要通知播放的MP3文件。 这个 MP3 文件应该在 raw 文件夹中。
看看是否有效