Best Practice -- NFL Weekly Scoreboard

How would you go about displaying teams and scores for the week?
Would I create a label for each item, static or dynamic ?
Or, I created a web page to read the json data and create an html table, and the MIT App just displays the web page in a browser object. It seems to me just loading a web page in the browser object defeats the purpose of an app. But, is that generally how many apps are done ?

Thank you
Mike

  • Avoid violating other's intellectual property. Some of the sports information you may want to collect is probably copyrighted.

  • You can 'create a label for each item' and posit it that way or post the data you collect in a table. The question is how you repopulate the data once a week or as it changes. You will need an app that can access a database.

  • Using the browser to display your web page where you provide the information could work. Defeats the purpose ???? Generally apps provide information provided by your own server.

  • community discussions related to reporting game scores: Search results for 'game score' - MIT App Inventor Community

  • App Inventor is very flexible about how an app reports data. You might wish to read the note below regarding some of what is possible using this compiler.

Here are some 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

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

Thank you for your suggestions. I am getting the json data from a "Free" site, so it is supposed to be made available for people to access.

The page just refreshes its data every 10 seconds and updates the info as changed, score and game remain time / quarter.

Nothing fancy. Just scores...

This looks like a table with columns for

  • Home Team Name
  • Home Team score(s)
  • Away Team Name
  • Away Team score(s)
  • Date / Time
  • Network

For how to work with lists, including some sorting/selection options, see

1 Like

Hello Michael

To help you with more detail we would need the site URL so that we can examine the json data.

There is an extension available to display data tabulated, or you can build an HTML table and display that in-App, in a WebViewer component. The HTML file would be saved on your device and then loaded into the WebViewer, no internet required for that process.

1 Like

Correct. That is what I did. I created a table with those columns and built a web page from it. Then the app just displays that page in a web viewer object.

I was just wondering if I can build the page dynamically with labels for each item, or design the screen with 18 label blocks and change the text for each one, for example, "lblGame01, lblGame02, lblGame03..." and then set text for lblGame01 with the info, etc.
I was thinking a list viewer, but I can't seem to format the output the way I want it.

The Webviewer approach is at

If you need extreme customization, see

1 Like

Attached is what I have so far. It is a combo of some old and new methods, since I first started the project.

There just has to be a way to loop through each group of controls, instead of creating blocks for each group of controls. :frowning:

NFL_20220921_01.aia (48.4 KB)

I looked at your blocks, and I don't see tables of component blocks that you would need for repeating Arrangements.

They would allow yo to use generic blocks in procedures parametrized by row number to display the games without duplication of code.

Here is a sample project that uses tables of components to allow addressing by row number ...

(This also shows efficient ways to use Designer copy/paste and Blocks Editor autofill to set up tables of components)

Also, I see places where you strip () and from lists on their way into displayable text. There is a JOIN WITH SEPARATOR block you can use with a blank or comma separator to do this cleaner. Be sure your text block actually has a blank, because the Blocks Editor strips them aggressively.

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