Make your own App Inventor Extension using App Inventor Sources & Online Builders | Codewaala

If you are an app developer using AI2 or any other distros of App Inventor then you'll need extensions to push the limitations of your app.

However, there are many developers all around the world who provides their Extensions for free or for a little donation.

But, If you have a little knowledge in Java and wanted to make your own extensions then you are at the right place.

Here we're going to discuss all the sources that made making extentions easy.

Let's go from the easy one & Recommended for the beginners and simple extentions.

Extension Builders on Web - Kodular IDE & Appybuilder Editor.

These are the online tools for making your own extensions. They are FREE to use ( Kodular may add a premium membership).

These are for the beginners of extention development who has no knowledge to set up the java JDK and ANT.

These come with the basic syntax (the code which is must to make an extension) in default.

So it will be very easy for you to build an extension.

Appybuilder's Code Editor also have many other functions. Check them out -Appybuilder Editor.

Kodular IDE is fast and reliable for extension making - Kodular IDE

The offline Extension making - Using App Inventor sources

Firstly you need to download :

GIT (Recommended)

Any Java Editor / Java IDE ( Notepad ++ would be better option else VS code)

 1. Installing Java JDK

Set the Environmental Variables of your pc to :

Set JAVA_HOME to where you installed Java JDK.
For example: C:\Program Files\Java\jdk1.8.0_131

Edit PATH and add those:

%JAVA_HOME%/bin, %JAVA_HOME%/jre/bin, C:\ProgramData\Oracle\Java\javapath

Make a quick check of Java JDK installation by

bash $ java -version java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
 Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Didn't Understand ? Read in detail with image representation.

2. Installing Apache ANT

Unzip the folder and move it to a place where it is safe. I want to place it in Drive C so the path would be " C:\apache-ant-1.10.1 "

Now set the Environmental Variables:

Set ANT_HOME to where you have the Ant folder placed. 

For example: C:\Ant\apache-ant-1.10.1

Edit Path and add %ANT_HOME%\bin

Edit ClassPath and add %ANT_HOME%\bin

Make a quick check of Ant installation:

bash $ ant -version Apache Ant(TM) version 1.10.1 compiled on February 2 2017

3. Installing GIT

This tutorial may help you in installing the GIT 

How to Install GIT - Atlassian

4. Now Unzip the App Inventor Sources

After you unzip AI sources write your java code for the extension using Notepad++ or VS Code.

You can have a look at the basic syntax which is required.

Check it on GITHUB here

After you write the code place it in --( appinventor-sources/appinventor/components/src/com/PACKAGE_NAME/

Now get to the appinventor folder of the sources

Right click and select GIT BASH HERE

After the command prompt opens up 

Type "ant extensions" Enter

After the build completes if you get BUILD Successful then congratulations you have built your own extension

Else if you see BUILD FAILED then you might have set something wrong.
It shows up error message which has errors in code with the line number beside it. Check your code and fix the errors.

Adding New Libraries

To add new libraries you must add the .jar files to the lib folder in the AI sources and update the build.xml file to import new libs.

That's all you need to know guys hope you found this helpful. If you face any kind of problems feel free to comment it down below. IllI try my best to help you.

Success is rarely determined by the quality of your ideas. But, frequently determined by quality of your execution.

                                                          - Quote by Jeff attwood ( stack overflow)

Cheers !        - Aravind Chowdary


  1. I love your extension, but is it possible to show as an second example, where you can see how to combine blocks with variables and aso on. this would make it much easier for us to understand

    1. I understand !

      Puravidaapps and AndresCotes have Opensource codes on their sites. Make sure you check them out.


  2. What about setting up ANT HOME

  3. Ok thansk for your answer and your nice tuturial but if i want to work with the online builder,how can i import jar files there, bc the online builder makes it easier to work with it,you dont need to built all the things before.

    1. In Online Builders like Kodular IDE & Appybuilder's Code Editor you have to send jar files to the builder team so they'll add it to the builder! No other way !


Post a Comment

Popular posts from this blog

Working With OpenWeather Maps API for making a Weather Application

Setting up JAVA_HOME variable in windows | CodeWaala