iOS delayed notification only fires if app closed (FMX)iOS notifications sporadic (FMX)ShowModal window opens NSOpenPanel will be auto closed in Delphi FMXHow to fire notification using TimeEditDelphi+iOS: How to include iOS Extension (.appex) to a FMX-App?Double click file to open in running instance of FMX appHow to load large bitmap in FMX (fire monkey)Delphi/FMX + iOS: UNUserNotificationCenter don't raises the delegate events (local notifications)fire event after mouse moves form - FMX C++Delphi FMX - read only checkbox in opendialog?iOS notifications sporadic (FMX)

Why force the nose of 737 Max down in the first place?

How did the Axis intend to hold the Caucasus?

Interrupt pin type on the 6502

Correlation length anisotropy in the 2D Ising model

Melee or Ranged attacks by Monsters, no distinction in modifiers?

Commercial jet accompanied by small plane near Seattle

When does Haskell complain about incorrect typing in functions?

Heisenberg uncertainty principle in daily life

Did the IBM PC use the 8088's NMI line?

How do I stop my characters falling in love?

What are the different qualities of the intervals?

Why do all my history books divide Chinese history after the Han dynasty?

If a 2019 UA artificer has the Repeating Shot infusion on two hand crossbows, can they use two-weapon fighting?

Pointwise convergence of uniformly continuous functions to zero, but not uniformly

How can I say in Russian "they cannot make the tournament attractive by itself"?

Aftermath of nuclear disaster at Three Mile Island

Vertical tennis ball into fancy new enumerate

Old French song lyrics with the word "baiser."

Am I allowed to use personal conversation as a source?

What is the use of で in this sentence?

Seaborn style plot of pandas dataframe

Word for showing a small part of something briefly to hint to its existence or beauty without fully uncovering it

How did Mysterio have these drones?

Would all these three things have the exact same effect on the flight duration of a glider?



iOS delayed notification only fires if app closed (FMX)


iOS notifications sporadic (FMX)ShowModal window opens NSOpenPanel will be auto closed in Delphi FMXHow to fire notification using TimeEditDelphi+iOS: How to include iOS Extension (.appex) to a FMX-App?Double click file to open in running instance of FMX appHow to load large bitmap in FMX (fire monkey)Delphi/FMX + iOS: UNUserNotificationCenter don't raises the delegate events (local notifications)fire event after mouse moves form - FMX C++Delphi FMX - read only checkbox in opendialog?iOS notifications sporadic (FMX)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Based on this Embarcadero example I have the following code in a TButton click in FMX app for iOS. Supposed to pop up a notification after 10 seconds.



void __fastcall TForm1::ScheduleNotificationButtonClick(TObject *Sender)

if (NotificationCenter1->Supported())
TNotification *myNotification = NotificationCenter1->CreateNotification();
__try
myNotification->Name = "MyNotification";
myNotification->AlertBody = "C++ for your mobile device is here!";
// Fire in 10 seconds
myNotification->FireDate = Now() + EncodeTime(0, 0, 10, 0);
// Send notification to the notification center
NotificationCenter1->ScheduleNotification(myNotification);

__finally
myNotification->DisposeOf();





When i click the button nothing happens. But, I accidentally figured out that i can make it fire by closing the app AFTER clicking the button. If i click the button and then close the app, sure enough, at 10 seconds the notification pops up. What could possibly be suppressing the notification from firing while the app is running?



p.s. This is related to my earlier post but this is unique enough i thought clearer to make separate post.










share|improve this question

















  • 2





    You should NOT be disposing of the object that you schedule. Embarcadero's example is wrong in that regard. Get rid of the try..finally altogether and let ARC manage the object lifetime for you.

    – Remy Lebeau
    Mar 26 at 20:46












  • @RemyLebeau - that solved it. Thanks!

    – relayman357
    Mar 29 at 1:22

















0















Based on this Embarcadero example I have the following code in a TButton click in FMX app for iOS. Supposed to pop up a notification after 10 seconds.



void __fastcall TForm1::ScheduleNotificationButtonClick(TObject *Sender)

if (NotificationCenter1->Supported())
TNotification *myNotification = NotificationCenter1->CreateNotification();
__try
myNotification->Name = "MyNotification";
myNotification->AlertBody = "C++ for your mobile device is here!";
// Fire in 10 seconds
myNotification->FireDate = Now() + EncodeTime(0, 0, 10, 0);
// Send notification to the notification center
NotificationCenter1->ScheduleNotification(myNotification);

__finally
myNotification->DisposeOf();





When i click the button nothing happens. But, I accidentally figured out that i can make it fire by closing the app AFTER clicking the button. If i click the button and then close the app, sure enough, at 10 seconds the notification pops up. What could possibly be suppressing the notification from firing while the app is running?



p.s. This is related to my earlier post but this is unique enough i thought clearer to make separate post.










share|improve this question

















  • 2





    You should NOT be disposing of the object that you schedule. Embarcadero's example is wrong in that regard. Get rid of the try..finally altogether and let ARC manage the object lifetime for you.

    – Remy Lebeau
    Mar 26 at 20:46












  • @RemyLebeau - that solved it. Thanks!

    – relayman357
    Mar 29 at 1:22













0












0








0


1






Based on this Embarcadero example I have the following code in a TButton click in FMX app for iOS. Supposed to pop up a notification after 10 seconds.



void __fastcall TForm1::ScheduleNotificationButtonClick(TObject *Sender)

if (NotificationCenter1->Supported())
TNotification *myNotification = NotificationCenter1->CreateNotification();
__try
myNotification->Name = "MyNotification";
myNotification->AlertBody = "C++ for your mobile device is here!";
// Fire in 10 seconds
myNotification->FireDate = Now() + EncodeTime(0, 0, 10, 0);
// Send notification to the notification center
NotificationCenter1->ScheduleNotification(myNotification);

__finally
myNotification->DisposeOf();





When i click the button nothing happens. But, I accidentally figured out that i can make it fire by closing the app AFTER clicking the button. If i click the button and then close the app, sure enough, at 10 seconds the notification pops up. What could possibly be suppressing the notification from firing while the app is running?



p.s. This is related to my earlier post but this is unique enough i thought clearer to make separate post.










share|improve this question














Based on this Embarcadero example I have the following code in a TButton click in FMX app for iOS. Supposed to pop up a notification after 10 seconds.



void __fastcall TForm1::ScheduleNotificationButtonClick(TObject *Sender)

if (NotificationCenter1->Supported())
TNotification *myNotification = NotificationCenter1->CreateNotification();
__try
myNotification->Name = "MyNotification";
myNotification->AlertBody = "C++ for your mobile device is here!";
// Fire in 10 seconds
myNotification->FireDate = Now() + EncodeTime(0, 0, 10, 0);
// Send notification to the notification center
NotificationCenter1->ScheduleNotification(myNotification);

__finally
myNotification->DisposeOf();





When i click the button nothing happens. But, I accidentally figured out that i can make it fire by closing the app AFTER clicking the button. If i click the button and then close the app, sure enough, at 10 seconds the notification pops up. What could possibly be suppressing the notification from firing while the app is running?



p.s. This is related to my earlier post but this is unique enough i thought clearer to make separate post.







firemonkey c++builder






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 18:48









relayman357relayman357

1621 silver badge11 bronze badges




1621 silver badge11 bronze badges







  • 2





    You should NOT be disposing of the object that you schedule. Embarcadero's example is wrong in that regard. Get rid of the try..finally altogether and let ARC manage the object lifetime for you.

    – Remy Lebeau
    Mar 26 at 20:46












  • @RemyLebeau - that solved it. Thanks!

    – relayman357
    Mar 29 at 1:22












  • 2





    You should NOT be disposing of the object that you schedule. Embarcadero's example is wrong in that regard. Get rid of the try..finally altogether and let ARC manage the object lifetime for you.

    – Remy Lebeau
    Mar 26 at 20:46












  • @RemyLebeau - that solved it. Thanks!

    – relayman357
    Mar 29 at 1:22







2




2





You should NOT be disposing of the object that you schedule. Embarcadero's example is wrong in that regard. Get rid of the try..finally altogether and let ARC manage the object lifetime for you.

– Remy Lebeau
Mar 26 at 20:46






You should NOT be disposing of the object that you schedule. Embarcadero's example is wrong in that regard. Get rid of the try..finally altogether and let ARC manage the object lifetime for you.

– Remy Lebeau
Mar 26 at 20:46














@RemyLebeau - that solved it. Thanks!

– relayman357
Mar 29 at 1:22





@RemyLebeau - that solved it. Thanks!

– relayman357
Mar 29 at 1:22












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55364315%2fios-delayed-notification-only-fires-if-app-closed-fmx%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55364315%2fios-delayed-notification-only-fires-if-app-closed-fmx%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현