How can I display the schedule?

To display the schedule you need to to learn how you can use a List .** This tutorial will help (especially the section 3. Display List Items ).

https://imagnity.com/tutorials/app-inventor/list-blocks-on-app-inventor/

To do all the things you would like to do you need to learn how to use the App Inventor components and tools. Here is some help

Resources to help you learn to use the AI2 tools.

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps

How to do a lot of basic things with App Inventor are described here: How do you...? .

Also look here App inventor español. Offline. Tutorial. Ejemplos. Instalación. Códigos. Juegos. Curso gratis de App inventor. and here Tutorial Index | imagnity for more tutorials including Imagnity.com List Tutorial, Mirrored - @Saj

Learn about components Component Reference
and visit the Library The MIT App Inventor Library: Documentation & Support Help>Library on the MENU

I can make this with if else blocks. But it would too long.
How I can make the blocks like this :
I have two list .
One for time and the other for the what to do like this:
Time list
1.5:00.
2.7:00.
3.12:00.
4.18:00
To Do list

  1. Study
    2 Yoga
    3 Lunch
    4 supper
    If the current time of the match with the time list then would show the to do list .
    Let suppose it is 12:00 than it it would show 3rd item on the list of To do list on a lebel

Use Dictionary Component.

Can you please tell me in depth ?

Use These blocks and learn from them if you not got confused somewhere ask me.

Setup By Dictionary Blocks and getting of the value onTimeDo.(I used button click for manual testing you need to place the at there,where you want it.)

This is the Main method for you to use and get the values of list by method of dictionary

Aia File: TestToDoList.aia (4.1 KB)

No I mean if it's matches with anytime of dictionary then it would automatically show the lebel of what to do.

In foreground or background or both?

In foreground use :

Clock.TimerDo block set it's interval at 100ms and fires time enabled and in the block place full block I gave you it works nice in foreground.

In background use ITOO extension

Use this block:

component_event

Set Designer Properties to:

An if then block that has to know all possible times, hard coded?

You can do better than that.

For sorting Time of Day, text fails, because "5:00" > "11:00".

Instead, keep time of day as Minutes since midnight, and use that for sorting and comparisons. Reformat for display.

1 Like

Are my blocks wrong?

It's pnambic

2 Likes

In this case, dictionaries are not ideal (especially with time being keys), because keys have to be unique:


(though this example would work if the keys and values were swapped, it still doesn't make much sense to use them).

It's better to just use nested lists, since lists don't seem to care about plagiarism. (Revised logic):

No i mean if The current Time matches with the time
Then it would display the what to do in a lebel . So I made a block . Please check is the block correct?

Clock1.Minute doesn't have 00 format by itself.

1 Like

Then what can I do when you tell briefly

To turn single digit numbers to two digit numbers, test them if < 10

If n < 10 then return Join ('0',n)

Also:

https://puravidaapps.com/snippets.php#2leadingZeros

Time format from timepicker - #2 by Alpha2020 for what ABG and TIM are talking about. Alternatively, use the FormatDateTime block.

See here for a longer solution

and I forgot I also had

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.