App Inventor
com.google.appinventor.components.runtime.ReplForm Class Reference
Inheritance diagram for com.google.appinventor.components.runtime.ReplForm:
com.google.appinventor.components.runtime.Form com.google.appinventor.components.runtime.AppInventorCompatActivity com.google.appinventor.components.runtime.Component com.google.appinventor.components.runtime.ComponentContainer com.google.appinventor.components.runtime.HandlesEventDispatching

Classes

class  SchemeInterface
 

Public Member Functions

void addLogcatButton (Menu menu)
 
void addSettingsButton (Menu menu)
 
void evalScheme (String sexp)
 
String getAssetPath (String asset)
 
String getAssetPathForExtension (Component component, String asset) throws FileNotFoundException
 
boolean isAssetsLoaded ()
 
boolean isDirect ()
 
void loadComponents (List< String > extensionNames)
 
void onCreate (Bundle icicle)
 
boolean onCreateOptionsMenu (Menu menu)
 
void sendToCompanion (String data)
 
void setAssetsLoaded ()
 
void setFormName (String formName)
 
void setIsUSBrepl ()
 
void setWebRTCMgr (WebRTCNativeMgr mgr)
 
void startHTTPD (boolean secure)
 
void Theme (String theme)
 
- Public Member Functions inherited from com.google.appinventor.components.runtime.Form
void $add (AndroidViewComponent component)
 
Activity $context ()
 
Form $form ()
 
String AboutScreen ()
 
void AboutScreen (String aboutScreen)
 
int AccentColor ()
 
void AccentColor (int color)
 
void ActionBar (boolean enabled)
 
void addAboutInfoToMenu (Menu menu)
 
void addExitButtonToMenu (Menu menu)
 
int AlignHorizontal ()
 
void AlignHorizontal (int alignment)
 
int AlignVertical ()
 
void AlignVertical (int alignment)
 
void AppName (String aName)
 
void AskForPermission (String permissionName)
 
void askPermission (final BulkPermissionRequest request)
 
void askPermission (final String permission, final PermissionResultHandler responseRequestor)
 
void assertPermission (String permission)
 
int BackgroundColor ()
 
void BackgroundColor (int argb)
 
String BackgroundImage ()
 
void BackgroundImage (String path)
 
boolean BackPressed ()
 
void BlocksToolkit (String json)
 
void callInitialize (Object component) throws Throwable
 
boolean canDispatchEvent (Component component, String eventName)
 
void clear ()
 
String CloseScreenAnimation ()
 
void CloseScreenAnimation (String animType)
 
float compatScalingFactor ()
 
void deleteComponent (Object component)
 
float deviceDensity ()
 
void dispatchErrorOccurredEvent (final Component component, final String functionName, final int errorNumber, final Object... messageArgs)
 
void dispatchErrorOccurredEventDialog (final Component component, final String functionName, final int errorNumber, final Object... messageArgs)
 
boolean dispatchEvent (Component component, String componentName, String eventName, Object[] args)
 
void dispatchGenericEvent (Component component, String eventName, boolean notAlreadyHandled, Object[] args)
 
void dispatchPermissionDeniedEvent (final Component component, final String functionName, final PermissionException exception)
 
void dispatchPermissionDeniedEvent (final Component component, final String functionName, final String permissionName)
 
boolean doesAppDeclarePermission (String permissionName)
 
void dontGrabTouchEventsForComponent ()
 
void ErrorOccurred (Component component, String functionName, int errorNumber, String message)
 
void ErrorOccurredDialog (Component component, String functionName, int errorNumber, String message, String title, String buttonText)
 
synchronized Bundle fullScreenVideoAction (int action, VideoPlayer source, Object data)
 
HandlesEventDispatching getDispatchDelegate ()
 
String getOpenAnimType ()
 
int Height ()
 
void HideKeyboard ()
 
void Icon (String name)
 
void Initialize ()
 
boolean isDarkTheme ()
 
boolean isDeniedPermission (String permission)
 
void onConfigurationChanged (Configuration newConfig)
 
Dialog onCreateDialog (int id)
 
void onGlobalLayout ()
 
boolean onKeyDown (int keyCode, KeyEvent event)
 
boolean onOptionsItemSelected (MenuItem item)
 
void onPrepareDialog (int id, Dialog dialog)
 
void onRequestPermissionsResult (int requestCode, String permissions[], int[] grantResults)
 
InputStream openAsset (String asset) throws IOException
 
InputStream openAssetForExtension (Component component, String asset) throws IOException
 
String OpenScreenAnimation ()
 
void OpenScreenAnimation (String animType)
 
void OtherScreenClosed (String otherScreenName, Object result)
 
void PermissionDenied (Component component, String functionName, String permissionName)
 
void PermissionGranted (String permissionName)
 
int PrimaryColor ()
 
void PrimaryColor (final int color)
 
int PrimaryColorDark ()
 
void PrimaryColorDark (int color)
 
int registerForActivityResult (ActivityResultListener listener)
 
void registerForActivityResult (ActivityResultListener listener, int requestCode)
 
void registerForOnClear (OnClearListener component)
 
void registerForOnCreateOptionsMenu (OnCreateOptionsMenuListener component)
 
void registerForOnDestroy (OnDestroyListener component)
 
void registerForOnInitialize (OnInitializeListener component)
 
void registerForOnNewIntent (OnNewIntentListener component)
 
void registerForOnOptionsItemSelected (OnOptionsItemSelectedListener component)
 
void registerForOnPause (OnPauseListener component)
 
void registerForOnResume (OnResumeListener component)
 
void registerForOnStop (OnStopListener component)
 
void registerPercentLength (AndroidViewComponent component, int length, PercentStorageRecord.Dim dim)
 
void runtimeFormErrorOccurredEvent (String functionName, int errorNumber, String message)
 
String ScreenOrientation ()
 
void ScreenOrientation (String screenOrientation)
 
void ScreenOrientationChanged ()
 
boolean Scrollable ()
 
void Scrollable (boolean scrollable)
 
void setChildHeight (final AndroidViewComponent component, int height)
 
void setChildWidth (final AndroidViewComponent component, int width)
 
boolean ShowListsAsJson ()
 
void ShowListsAsJson (boolean asJson)
 
boolean ShowStatusBar ()
 
void ShowStatusBar (boolean show)
 
void Sizing (String value)
 
String Title ()
 
void Title (String title)
 
boolean TitleVisible ()
 
void TitleVisible (boolean show)
 
void TutorialURL (String url)
 
void unregisterForActivityResult (ActivityResultListener listener)
 
void unregisterPercentLength (AndroidViewComponent component, PercentStorageRecord.Dim dim)
 
void VersionCode (int vCode)
 
void VersionName (String vName)
 
int Width ()
 
- Public Member Functions inherited from com.google.appinventor.components.runtime.AppInventorCompatActivity
ActionBar getSupportActionBar ()
 
final boolean isAppCompatMode ()
 
void onSupportActionModeFinished (ActionMode actionMode)
 
void onSupportActionModeStarted (ActionMode actionMode)
 
ActionMode onWindowStartingSupportActionMode (Callback callback)
 
void setContentView (View view)
 

Static Public Member Functions

static void returnRetvals (final String retvals)
 
- Static Public Member Functions inherited from com.google.appinventor.components.runtime.Form
static void finishActivity ()
 
static void finishActivityWithResult (Object result)
 
static void finishActivityWithTextResult (String result)
 
static void finishApplication ()
 
static Form getActiveForm ()
 
static boolean getCompatibilityMode ()
 
static String getStartText ()
 
static Object getStartValue ()
 
static void switchForm (String nextFormName)
 
static void switchFormWithStartValue (String nextFormName, Object startValue)
 
- Static Public Member Functions inherited from com.google.appinventor.components.runtime.AppInventorCompatActivity
static boolean isClassicMode ()
 
static boolean isEmulator ()
 
static void setClassicModeFromYail (boolean newClassicMode)
 

Static Public Attributes

static final String REPL_ASSET_DIR
 
static ReplForm topform
 
- Static Public Attributes inherited from com.google.appinventor.components.runtime.Form
static final String APPINVENTOR_URL_SCHEME = "appinventor"
 
static final String ASSETS_PREFIX = "file:///android_asset/"
 
static final int MAX_PERMISSION_NONCE = 100000
 
- Static Public Attributes inherited from com.google.appinventor.components.runtime.Component
static final int ACCELEROMETER_SENSITIVITY_MODERATE = 2
 
static final int ACCELEROMETER_SENSITIVITY_STRONG = 3
 
static final int ACCELEROMETER_SENSITIVITY_WEAK = 1
 
static final int ALIGNMENT_CENTER = 1
 
static final int ALIGNMENT_NORMAL = 0
 
static final int ALIGNMENT_OPPOSITE = 2
 
static final String ASSET_DIRECTORY = "component"
 
static final int BUTTON_SHAPE_DEFAULT = 0
 
static final int BUTTON_SHAPE_OVAL = 3
 
static final int BUTTON_SHAPE_RECT = 2
 
static final int BUTTON_SHAPE_ROUNDED = 1
 
static final int COLOR_BLACK = 0xFF000000
 
static final int COLOR_BLUE = 0xFF0000FF
 
static final int COLOR_CYAN = 0xFF00FFFF
 
static final int COLOR_DEFAULT = 0x00000000
 
static final int COLOR_DKGRAY = 0xFF444444
 
static final int COLOR_GRAY = 0xFF888888
 
static final int COLOR_GREEN = 0xFF00FF00
 
static final int COLOR_LTGRAY = 0xFFCCCCCC
 
static final int COLOR_MAGENTA = 0xFFFF00FF
 
static final int COLOR_NONE = 0x00FFFFFF
 
static final int COLOR_ORANGE = 0xFFFFC800
 
static final int COLOR_PINK = 0xFFFFAFAF
 
static final int COLOR_RED = 0xFFFF0000
 
static final int COLOR_WHITE = 0xFFFFFFFF
 
static final int COLOR_YELLOW = 0xFFFFFF00
 
static final String DEFAULT_VALUE_COLOR_BLACK = "&HFF000000"
 
static final String DEFAULT_VALUE_COLOR_BLUE = "&HFF0000FF"
 
static final String DEFAULT_VALUE_COLOR_CYAN = "&HFF00FFFF"
 
static final String DEFAULT_VALUE_COLOR_DEFAULT = "&H00000000"
 
static final String DEFAULT_VALUE_COLOR_DKGRAY = "&HFF444444"
 
static final String DEFAULT_VALUE_COLOR_GRAY = "&HFF888888"
 
static final String DEFAULT_VALUE_COLOR_GREEN = "&HFF00FF00"
 
static final String DEFAULT_VALUE_COLOR_LTGRAY = "&HFFCCCCCC"
 
static final String DEFAULT_VALUE_COLOR_MAGENTA = "&HFFFF00FF"
 
static final String DEFAULT_VALUE_COLOR_NONE = "&H00FFFFFF"
 
static final String DEFAULT_VALUE_COLOR_ORANGE = "&HFFFFC800"
 
static final String DEFAULT_VALUE_COLOR_PINK = "&HFFFFAFAF"
 
static final String DEFAULT_VALUE_COLOR_RED = "&HFFFF0000"
 
static final String DEFAULT_VALUE_COLOR_WHITE = "&HFFFFFFFF"
 
static final String DEFAULT_VALUE_COLOR_YELLOW = "&HFFFFFF00"
 
static final String DEFAULT_VALUE_TEXT_TO_SPEECH_COUNTRY = ""
 
static final String DEFAULT_VALUE_TEXT_TO_SPEECH_LANGUAGE = ""
 
static final int DIRECTION_EAST = 3
 
static final int DIRECTION_MAX = 4
 
static final int DIRECTION_MIN = -4
 
static final int DIRECTION_NONE = 0
 
static final int DIRECTION_NORTH = 1
 
static final int DIRECTION_NORTHEAST = 2
 
static final int DIRECTION_NORTHWEST = -4
 
static final int DIRECTION_SOUTH = -1
 
static final int DIRECTION_SOUTHEAST = 4
 
static final int DIRECTION_SOUTHWEST = -2
 
static final int DIRECTION_WEST = -3
 
static final float FONT_DEFAULT_SIZE = 14
 
static final int LAYOUT_ORIENTATION_HORIZONTAL = ComponentConstants.LAYOUT_ORIENTATION_HORIZONTAL
 
static final int LAYOUT_ORIENTATION_VERTICAL = ComponentConstants.LAYOUT_ORIENTATION_VERTICAL
 
static final int LENGTH_FILL_PARENT = -2
 
static final int LENGTH_PERCENT_TAG = -1000
 
static final int LENGTH_PREFERRED = -1
 
static final int LENGTH_UNKNOWN = -3
 
static final int SCALING_SCALE_PROPORTIONALLY = 0
 
static final int SCALING_SCALE_TO_FIT = 1
 
static float SLIDER_MAX_VALUE = 50
 
static float SLIDER_MIN_VALUE = 10
 
static float SLIDER_THUMB_VALUE = (SLIDER_MIN_VALUE + SLIDER_MAX_VALUE) / 2.0f
 
static final int TOAST_LENGTH_LONG = 1
 
static final int TOAST_LENGTH_SHORT = 0
 
static final int TYPEFACE_DEFAULT = 0
 
static final int TYPEFACE_MONOSPACE = 3
 
static final int TYPEFACE_SANSSERIF = 1
 
static final int TYPEFACE_SERIF = 2
 

Protected Member Functions

void closeApplicationFromBlocks ()
 
void closeForm (Intent resultIntent)
 
boolean isRepl ()
 
void onDestroy ()
 
void onNewIntent (Intent intent)
 
void onResume ()
 
void onStop ()
 
void processExtras (Intent intent, boolean restart)
 
void setResult (Object result)
 
void startNewForm (String nextFormName, Object startupValue)
 
void updateTitle ()
 
- Protected Member Functions inherited from com.google.appinventor.components.runtime.Form
void $define ()
 
void maybeShowTitleBar ()
 
void onActivityResult (int requestCode, int resultCode, Intent data)
 
void onPause ()
 
boolean toastAllowed ()
 
- Protected Member Functions inherited from com.google.appinventor.components.runtime.AppInventorCompatActivity
void hideTitleBar ()
 
void onPostCreate (Bundle savedInstanceState)
 
void onPostResume ()
 
void onTitleChanged (CharSequence title, int color)
 
void setActionBarEnabled (boolean enabled)
 
void setAppInventorTheme (Theme theme)
 
void setClassicMode (boolean classic)
 
void setPrimaryColor (int color)
 
void styleTitleBar ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from com.google.appinventor.components.runtime.Form
static String jsonEncodeForForm (Object value, String functionName)
 
- Static Protected Member Functions inherited from com.google.appinventor.components.runtime.AppInventorCompatActivity
static int getPrimaryColor ()
 
static boolean isActionBarEnabled ()
 
- Protected Attributes inherited from com.google.appinventor.components.runtime.Form
final Handler androidUIHandler = new Handler()
 
String formName
 
String startupValue = ""
 
String title = ""
 
- Protected Attributes inherited from com.google.appinventor.components.runtime.AppInventorCompatActivity
ThemeHelper themeHelper
 
- Static Protected Attributes inherited from com.google.appinventor.components.runtime.Form
static Form activeForm
 

Detailed Description

Subclass of Form used by the 'stem cell apk', i.e. the Android app that allows communication via the Repl

Author
markf.nosp@m.@goo.nosp@m.gle.c.nosp@m.om (Mark Friedman)

Member Function Documentation

◆ getAssetPath()

String com.google.appinventor.components.runtime.ReplForm.getAssetPath ( String  asset)

Gets the path to an asset.

Parameters
assetThe filename of an application asset
Returns
A file: URI to the asset

Reimplemented from com.google.appinventor.components.runtime.Form.

◆ getAssetPathForExtension()

String com.google.appinventor.components.runtime.ReplForm.getAssetPathForExtension ( Component  component,
String  asset 
) throws FileNotFoundException

Determines a WebView compatible, REPL-sensitive path for an asset provided by a given extension.

Parameters
componentThe extension that is requesting an asset
assetThe asset filename
Returns
A string containing the path to the asset
Exceptions
FileNotFoundExceptionif the asset cannot be located

Reimplemented from com.google.appinventor.components.runtime.Form.

◆ loadComponents()

void com.google.appinventor.components.runtime.ReplForm.loadComponents ( List< String >  extensionNames)

This is a nasty hack. For loading external component's dex file so that they can be accessible for kawa to load it, when required. This assumes classloader checks class via delegation through the parent classloaders. For multiple dex files, we just cascade the classloaders in the hierarchy

Member Data Documentation

◆ REPL_ASSET_DIR

final String com.google.appinventor.components.runtime.ReplForm.REPL_ASSET_DIR
static
Initial value:
=
Environment.getExternalStorageDirectory().getAbsolutePath() +
"/AppInventor/assets/"

The documentation for this class was generated from the following file: