Eigenen Sound für Notifications unter iOS (RTFM)!
Hallo Zusammen!
Das kommt davon, wenn man nicht aufmerksam liest... Daher RTFM! Für alle die es - wie ich - auch nicht gelesen haben... Auszug aus dem docwiki;
Delphi-Quellcode:
Aber NICHT!
procedure TForm1.SoundNotificationClick(Sender: TObject);
var MyNotification: TNotification; begin MyNotification := NotificationCenter1.CreateNotification; try MyNotification.Name := 'MyNotification'; MyNotification.AlertBody := 'Delphi for your mobile device is here!'; MyNotification.EnableSound := True; MyNotification.SoundName := GetSoundName; MyNotification.FireDate := Now + EncodeTime(0, 0, 10, 0); // Meldung an Mitteilungszentrale senden NotificationCenter1.ScheduleNotification(MyNotification); finally MyNotification.Free; end; end;
Delphi-Quellcode:
den
MyNotification.SoundName := GetHomePath + PathDelim + 'Documents' + PathDelim + 'Nachricht.caf';
Delphi-Quellcode:
Fein... Warum auch immer iOS nicht den Path zur Datei braucht...
function TForm1.GetSoundName: string;
begin {$IFDEF IOS} Result := 'myiOSSound.caf'; {$ENDIF} {$IFDEF ANDROID} Result := TPath.Combine(TPath.GetSharedDocumentsPath, 'myAndroidSound.mp3'); {$ENDIF} end; Zitat:
Dann findet man Zitat:
Zitat:
Warum das nicht direkt unter 8 so steht, verstehe wer will... Und? Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:41 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz