Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   NotificationCenter - kein Sound unter Apple? (https://www.delphipraxis.net/180283-notificationcenter-kein-sound-unter-apple.html)

LangTsu 7. Mai 2014 13:40

NotificationCenter - kein Sound unter Apple?
 
Hallo Community ;)

ich suchte eine Möglichkeit in meine App Benachrichtigungen einzubauen und bin auf folgendes Tutorial gestossen:

http://docwiki.embarcadero.com/RADSt...und_Android%29

Das ist auch genau das was ich gesucht habe.
Nur leider klappt das mit dem Sound unter Apple bei mir nicht :?:

Ich bekomme die Notifications angezeigt, bekomme aber keinen Sound dazu.
Kennt dieses Problem jemand oder Kann mit BITTE sagen was ich machen muss :-D

Wäre wirklich Klasse von euch Danke!

Hier mein Code
Code:
procedure TForm1.Button1Click(Sender: TObject);
var
  Notification : TNotification;
begin
   Notification := NotificationCenter1.CreateNotification;
  try
    Notification.Name := 'Neuer Job';
    Notification.AlertBody := 'Neuer Job ist vorhanden';
    Notification.Number := 1;
    Notification.EnableSound := True;
    Notification.AlertAction := 'Launch';
    Notification.HasAction := True;
    NotificationCenter1.PresentNotification(Notification);
  finally
    Notification.DisposeOf;
  end;

LangTsu 9. Mai 2014 09:54

AW: NotificationCenter - kein Sound unter Apple?
 
Hat denn keiner eine Idee? :?:|
Bin ich der einzige bei dem das so ist...

Sherlock 9. Mai 2014 10:08

AW: NotificationCenter - kein Sound unter Apple?
 
Ganz dumme Frage: Den abzuspielenden Sound hast du definiert bzw. mitgegeben?

Sherlock

Union 9. Mai 2014 10:17

AW: NotificationCenter - kein Sound unter Apple?
 
Einen abweichenden Sound angeben kann man wohl nicht. Jedenfalls nicht mit FMX. Aber falls keiner definiert ist oder die Sounddatei nicht gefunden wird, wird der Standard-Systemsound verwendet.

Crocotronic 9. Mai 2014 13:30

AW: NotificationCenter - kein Sound unter Apple?
 
Eine noch dümmere Frage: Sicher, dass der Ton an ist?

LangTsu 13. Mai 2014 10:20

AW: NotificationCenter - kein Sound unter Apple?
 
Danke für eure Antworten :)

Ja der Sound ist tatsächlich an daran liegt es nicht.

Und ja eine eine Sounddatei kann nicht übergeben werden aber das kann doch nicht das Problem sein.
Ich habe es mit Android versucht dort funktioniert es einwandfrei...

Hat Vielleicht noch jemand eine Idee? oder muss ich mich einfach damit abfinden das es schlicht und einfach unter Apple nicht geht

moe120 23. Mai 2014 13:07

AW: NotificationCenter - kein Sound unter Apple?
 
habs grad mal probiert, bei mir gehts (XE6) mit Ton:

Delphi-Quellcode:
 _notification:= NotificationCenter1.CreateNotification;
 _notification.Name:= 'blubb';
 _notification.EnableSound:= true;
 _notification.AlertBody:= 'Erinnerung - Termin'+ t_pref +t_bez + t_ort + ' beginnt in ' + notif_lapse;
 _notification.FireDate:= termin.termin_start - reminder_diff;
 NotificationCenter1.ScheduleNotification(_notification);
ich muss aber aus der App rausgehen damit ich geplante Notifications angezeigt bekomme. Weiss nicht ob das normal ist, verstehen könnte ichs ja ein bischen von wegen dass man nicht bei der Eingabe unterbrochen wird etc.

Du hast geschrieben Ton ist an, hast du auch mal unter Einstellungen > Mitteilungen geschaut bei den Settings für deine App ? (aber ich glaub der Eintrag dort kommt erst rein wenn man sich mit dem Kinvey oder Parse Provider beim Appstart anmeldet damit die Abfrage kommt "darf Ihnen XY Push Benachrichtigungen senden"

Sir Rufo 23. Mai 2014 23:55

AW: NotificationCenter - kein Sound unter Apple?
 
Auf developer.apple.com steht:
Zitat:

Local notifications and push notifications are ways for an application that isn’t running in the foreground ...
hört sich eindeutig und logisch für mich an :)


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:37 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