I am new at using MIT App inventor. I am working to make an app which send a text at the time of users choice. How can I add this delay to call sendmessage method at that time of choice?
how the user make his choice? press a button? tick a checkbox? select from listview?
then send the message in the relevant event.
The user will type a message in the text_box
and will select the time from the time_picker
, it will be the time he wants the message to be delivered. Then he will press the send_delay
button to queue the message to send at the time of hos choice.
when send_delay_button.clicked,
caculate the delay duration, set it as the clock.timerinterval, set the clock.timerEnabled to true.
when clock.timer
set clock.timerEnabled to false
send the message.
How can I calculate the delay duration between system time and user-selected time?
You can adapt this according to your need,
Note, it is not possible to schedule an event in the future and expect it to execute unless:
- you prevent your app from sleeping
- use a background extension.