Sending notifications without push button and comparing date time

Hi Good day, I've seen many discussions on sending push notifications in which I've tried one and it works.


However, it only works when I press a button and not based on an event. I tried to place it in my screen initialising block and it did not work.

I wanted to know is there a way to let the notification be sent based on a specific time instead of pushing a button?
I wanted a notification to to be sent when the time and date selected by the user to take a pill, is equal to the current date. I've only seen topics with date comparison only, is there a way to check for both date and time?

This is how I set my date and time and store it. I used time picker and date picker. Can someone please assist me if possible.

Screenshot 2022-06-01 at 12.58.38 AM

1 Like

This extension may help.

2 Likes

Okay thank you. I will review it

1 Like

Hi so after trying this extension and adding it to my app how I'd want it, I've run into a problem. My date time to set the alarm isn't working as it should, the instant time is not printing.

These are my blocks followed like what is in the extension


Screenshot 2022-06-06 at 12.24.53 AM

Screenshot 2022-06-06 at 12.25.17 AM

However, this is my result

The alarm set time keeps displaying 00:00:00 and there seems to be an overlap with the date as there is an extra number being printed in the year.
Can Anyone assist?

1 Like

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

DO IT shows the right date and time result however, only the date prints on the app and the time shows 00:00:00.

I am still unsure why this is displaying like that.

1 Like

Could you share your .aia file here ?

I am not sure if I am allowed to based on the terms of the extension being used but I can show my designer and blocks view




1 Like

I don't think that @Taifun ever gave any term that would stop one from sending the .aia file. :sweat_smile:

I'm going to try it out. Bye :wave:

@Taifun Everytime he set the time text in Label33 was output from your extension. Maybe the problem is in your extension.

I don't understand what you're saying

As it is a paid extension sharing an aia file is prohibited

@JH1 can you provide an exawhat exactly you are tr6todo?

See also my Q&A on my webpage

Taifun

I am just trying to set the date and time for an alarm as you've done in your app. However, It is not showing the time when I do it. It prints when I use the DO IT function but it does not show in the app itself. It only shows the date and the time shows as 00:00:00

This

Screenshot_20220607-132437_DuckDuckGo

is not the correct format for the MakeInstant block...

If you use the correct format, then you will also get the correct output...

MakeInstant(from)

Returns an instant in time specified by MM/dd/YYYY hh:mm:ss or MM/dd/YYYY or hh:mm.

Taifun

1 Like

Actually, I did do it how I saw it in your coding first and I got this, the top Do It result which the time has no space from the year

So I tried other options which is what you saw above

Make sure you do have a space in that second text block in the join, and it is not just an empty block.

Oh wow, something so simple. Thank you very much!

2 Likes

Also, even though all is right now, I still don't get the notifications but I do with yours. Does the app need all the components in your file for the notifications to work?

Oh never mind, it works when I actually build the app.