Invisible component quickstart
A simple template for an invisible component.
InvisibleQuickstart.java
package com.example.SimpleProject;
import com.google.appinventor.components.annotations.*;
import com.google.appinventor.components.runtime.*;
import com.google.appinventor.components.common.*;
@UsesPermissions(permissionNames="")
@DesignerComponent(version = 1,
description = "An extension project",
category = ComponentCategory.EXTENSION,
nonVisible = true,
iconName = "",
helpUrl = "")
@SimpleObject(external = true)
public class SimpleProject extends AndroidNonvisibleComponent {
private ComponentContainer container;
public String UserID;
public volatile String returnedData = "";
public SimpleProject(ComponentContainer container) {
super(container.$form());
this.container = container;
}
@SimpleFunction(description = "Returns 'hello'")
public String GetItem(String variableName) {
return "hello";
}
}
Last updated