How to use extensions

How to use extensions?

We frequently see users on the community who don’t know how to use extensions.

This is from the App Inventor website

Extension components can be used in building projects, just like other components. The difference is that extension components can be distributed on the Web and loaded into App Inventor dynamically: they do not have to be built into the App Inventor system, and they can be imported into projects as needed. With extensions, the range of App Inventor apps can be virtually unlimited.
One use of extensions, for example, is for educators and educational software developers to provide extension components tailored to specific lessons and activities that students can use in building apps. Examples might be simulations or data analysis tools. Those apps might be unfeasible to create directly with the built-in App Inventor blocks, either because of processing speed or programming complexity. But those same apps might be readily programmable in the App Inventor framework, using extension components that perform the necessary processing.
Anyone can create extension components. This requires gaining familiarity with the App Inventor source code (located on Github) and programming the extension in Java. Extension components are packaged as aix files. Once you create an extension component, anyone can use it in their App Inventor projects. Extension component aix files can be housed anywhere on the Web. The aix files need not be stored at MIT or any other particular place, although MIT hosts a repository where people can make aix files available for sharing and public use.
Note: One limitation of the current extension component implementation is that it creates non-visible components only (i.e., components that do not show on the designer screen). MIT plans to remove this restriction in future versions of the extension component system.

@pavi2410, one the Kodular developers is working on making the visible components possible during the Google Summer of Code 2020.

So how to work with extensions when using Kodular?

If you want to use extensions you have to go to the extension category on the Palette.

After you click on the import extension button you get a dialog with two options.

image

You can import your extension if you have a url from a website or you can import it if the extension is on your HD.

If you have an url you can paste this in the textbox and press IMPORT FROM URL

If you got the extension on your harddrive you have to press NO FILE CHOSEN and after that IMPORT FROM FILE.

Either way you choose you have to drag and drop the extension on the mockup of the phone to be able to use it. You can see that in the gif above.

When you go to the block editor you can see that your extension is also there and you can use its blocks like you would do with all other components of Kodular.

If you want to remove an extension you have to press the wastebasket to the right of the extension. Then you will have to confirm that you want to delete the extension.

Remember that all blocks related to that extension will be deleted from your app.

When you want to update an extension you can just follow the process as shown above. Kodular will let you know you have updated your extension.

If you want to see which version you have of the extension you can press the
information icon to the right of the extension name.

Peek 2020-08-22 11-31

For a complete list of all extensions that are available for App Inventor and Kodular see this page made by @Taifun App Inventor Extensions | Pura Vida Apps

Let me know if you miss anything in this little guide.

18 Likes

4 posts were split to a new topic: What is the best way extension system

A question, what happen when building the app? Will all the extensions of the project be integrated into the app or only those which were actually used.

@Dokolo i think only those who were actually used

make more sens just wanted to make sure.
In general when i do not need anymore an extension i uninstall it to have a project cleaner but alway wondering if it will make difference if i leave it there.

If you keep an extension into your project which is not in use, it will only occupy the space of his size.

you mean in my app :grimacing: or in Kodular servers?

But why you want to keep unused extensions in your project? Just remove them before compiling final apk!

2 Likes

In compiled app.

Ouch! i thought Kodular will just skeep them when compilling…
So i have to make sure to clean up before to do final release.

Thanks.

Kodular can’t do everything for you especially when you are not taking any effort for the same…

Besides its always nice to have a clean and tidy code of the app that we are going to publish to play store or distribute via any other means.
This is developers duty solely and not of Kodular

2 Likes