Basic Files

You can store data on a server somewhere and then pull it directly into your app. This lets you update the data without having to update the app. It can even happen every time the app launches and be invisible “magic” to your users.

Consider this simple app as an example. When the button is clicked, it fetches the file (specified in the blocks) and displays that file in the label. Figure 11.6 shows such a design, and Figure 11.7 shows the simple blocks that use the Web component to fetch the file from the Internet.

Image

Figure 11.6 Design of a demo app that fetches text from a website on the Internet.

Figure 11.7 Blocks that use a ...

Get Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.