Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   Android / TNotification funktioniert nicht (https://www.delphipraxis.net/188637-android-tnotification-funktioniert-nicht.html)

greenmile 23. Mär 2016 11:32

Android / TNotification funktioniert nicht
 
Hallo,

irgendwie funktioniert bei mir die zeitgesteuerte TNotification nicht. Ich habe auch keine speziellen Berechtigungen gefunden. Betrifft Delphi XE10.
Source:

Code:
var MyNotification: TNotification;

MyNotification := NotificationCenter1.CreateNotification;
MyNotification.Name := 'Test_Reminder'; // Interner Name
MyNotification.AlertBody := 'Testalert';
MyNotification.FireDate := Now+EncodeTime(12, 30, 0, 0);
NotificationCenter1.ScheduleNotification(MyNotification);
Hat jemand einen Tipp für mich?

bra 23. Mär 2016 11:40

AW: Android / TNotification funktioniert nicht
 
Auf die Schnelle:
Delphi-Quellcode:
MyNotification.FireDate := Now+EncodeTime(12, 30, 0, 0);


Bedeutet das nicht jetzt + 12,5 Stunden?

Besser wäre hier vielleicht zum Test
Delphi-Quellcode:
IncMinute(Now, 1);


Oder:
Delphi-Quellcode:
RecodeMinute(RecodeHour(Now, 12), 30);

Edit: Irgendwie zerschießen die Delphi-Tags die Zeilenumbrüche...

greenmile 23. Mär 2016 11:56

AW: Android / TNotification funktioniert nicht
 
Ups, mein Fehler, dass passiert, wenn man sich an den Beispielen orientiert. Danke.

Code:
MyNotification.FireDate := Date+EncodeTime(18, 0, 0, 0);


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:19 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz