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
4 Likes
yusufcihan
(Yusuf Cihan)
February 10, 2020, 10:04am
4
Java.
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.
6 Likes
I mean that
format means like this
import com.google.appinventor.components.annotations.DesignerComponent;
@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
// -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2019 MIT, All rights reserved
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
package com.google.appinventor.components.runtime;
import com.google.appinventor.components.annotations.SimpleObject;
import com.google.appinventor.components.common.ComponentConstants;
/**
* Interface for Simple components.
*
*/
@SimpleObject
public interface Component {
/**
* Returns the dispatch delegate that is responsible for dispatching events
* for this component.
This file has been truncated. show original
1 Like
Ken
(Ken)
February 10, 2020, 1:23pm
7
See here:
I’ve found the best way for me to learn is to look at the existing source code found here:
2 Likes