我希望我的应用不播放默认的通知声音,但我想播放Android智能手机上安装的任何其他声音。我知道可以在Android智能手机上的“应用程序设置” /“通知类别”下更改所有其他通知声音。我的问题是,如何将[Good]等声音与MyNotification.SoundName
结合起来。我使用Delphi 10.3.3
procedure TForm1.Button1Click(Sender: TObject);
var
MyNotification: TNotification;
begin
MyNotification := NotificationCenter1.CreateNotification;
try
MyNotification.Name := 'MyNotification';
MyNotification.Title := 'Notification 01';
// MyNotification.SoundName := how to get another sound that are installed on the smartphone
// for example
MyNotification.SoundName := TPath.Combine(TPath.???, 'Good news???.mp3');
MyNotification.FireDate := Now;
NotificationCenter1.ScheduleNotification(MyNotification);
finally
MyNotification.Free;
end;
end;
非常感谢您的任何建议和帮助。