AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.util.EclairUtil Class Reference

Static Public Member Functions

static void overridePendingTransitions (Activity activity, int enterAnim, int exitAnim)
 
static void setupWebViewGeoLoc (final WebViewer caller, WebView webview, final Activity activity)
 
static void clearWebViewGeoLoc ()
 
static String getInstallerPackageName (String pname, Activity form)
 
static void disableSuggestions (EditText textview)
 

Detailed Description

Helper methods for calling methods added in Eclair (2.0, API level 5)

Author
Ryan Bis

Definition at line 31 of file EclairUtil.java.

Member Function Documentation

◆ clearWebViewGeoLoc()

static void com.google.appinventor.components.runtime.util.EclairUtil.clearWebViewGeoLoc ( )
static

Clear Stored Location permissions. When the geolocation API is used in the WebViewer, the end user is prompted on a per URL basis for whether or not permission should be granted to access their location. This function clears this information for all locations.

As the permissions interface is not available on phones older then Eclair, this function is a no-op on older phones.

Definition at line 100 of file EclairUtil.java.

◆ disableSuggestions()

static void com.google.appinventor.components.runtime.util.EclairUtil.disableSuggestions ( EditText  textview)
static

Disable suggestions on EditText widgets. This was added to support SDK levels where suggestions crashed apps without the appropriate Android Support library compiled into the app.

Parameters
textviewEditText widget to have its suggestion feature disabled.

Definition at line 117 of file EclairUtil.java.

◆ getInstallerPackageName()

static String com.google.appinventor.components.runtime.util.EclairUtil.getInstallerPackageName ( String  pname,
Activity  form 
)
static

Definition at line 105 of file EclairUtil.java.

◆ overridePendingTransitions()

static void com.google.appinventor.components.runtime.util.EclairUtil.overridePendingTransitions ( Activity  activity,
int  enterAnim,
int  exitAnim 
)
static

Calls Activity#overridePendingTransition(int, int). This is used to set a different animation type for screen transition animations.

Parameters
activity- The activity handling the animation
enterAnim- The enter animation type
exitAnim- The exit animation type

Definition at line 44 of file EclairUtil.java.

◆ setupWebViewGeoLoc()

static void com.google.appinventor.components.runtime.util.EclairUtil.setupWebViewGeoLoc ( final WebViewer  caller,
WebView  webview,
final Activity  activity 
)
static

Setup Dialog Box to request location permission from end-user for the Javascript location (navigator.geolocation.getCurrentLocation()) API.

Parameters
webview- The WebView component running the Javascript engine that needs permission
activity- Its containing activity used for placing the dialog box

Definition at line 56 of file EclairUtil.java.


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