How to write code for extension (Format)

I installed all the necessary tools to develop extension
I already created an extension successfully by referring this page
but when i am pasting some java codes from internet and creating extension, I am getting error
so I want to know that what is the code format to make extensions for app inventor platforms
Thank you…

Did you have knowledge of java
Just copy and paste code from somewhere in not enough there is need to import packages for corresponding work



Java (or any programming language) is not a programming language which you can code by just copying and pasting code from internet. If you know Java and know how to read errors, you will find out where is the error.


I mean that
format means like this

@DesignerComponent(version = Pitagoras.VERSION,
    description = "Teorema de Pitagoras. " + "Juan Antonio Villalpando - KIO4.COM ",
    category = ComponentCategory.EXTENSION,
    nonVisible = true,
    iconName = "")
  @SimpleProperty(category = PropertyCategory.BEHAVIOR)
    public double Cateto_A() {
        return cateto_a;

I dont know the rule format to implement in code
(I dont know JAVA)- but i will do it if know some format

Dont get confused about format— I am saying that like a letter has a format

I want to know rules or format to write extension code

I have found a useful page

1 Like

See here:

I’ve found the best way for me to learn is to look at the existing source code found here: