Packagecom.myflashlab.air.extensions.richWebView.android
Classpublic class Android
InheritanceAndroid Inheritance flash.events.EventDispatcher

This class is the entry point for accessing the WebView API on Android. You must not initialize it yourself. Instead, you can have access to it via RichWebView.android.



Public Properties
 PropertyDefined By
  airPrefixEnabled : Boolean
Set this property to false if you have forced your AIR app to drop the "air." prefix when packaging the .apk file Default value is true.
Android
  cookieManager : Cookies
[read-only] Returns a reference to the global Cookies class in Android.
Android
  embeddedBrowser : EmbeddedBrowser
[read-only] Returns a reference to the CustomTab in Android.
Android
  safeBrowsingPrivacyPolicyUrl : String
[read-only] Returns a URL pointing to the privacy policy for Safe Browsing reporting.
Android
  webContentsDebuggingEnabled : Boolean
[write-only] Enables debugging of web contents (HTML / CSS / JavaScript) loaded into any WebViews of this application.
Android
  webviewDatabase : WebViewDatabase
[read-only] Returns a reference to an instance of WebViewDatabase class
Android
Public Methods
 MethodDefined By
  
Enabling drawing the entire HTML document has a significant performance cost.
Android
  
getInstance($x:int = 0, $y:int = 0, $width:int = 200, $height:int = 200):WebView
Returns a new instance of WebView window.
Android
  
Move the AIR activity to the back of the activity stack.
Android
  
safeBrowsingWhitelist($arr:Array, $callback:Function = null):void
Sets the list of hosts (domain names/IP addresses) that are exempt from SafeBrowsing checks.
Android
  
Specify an explicit soft input mode to use for the window, as WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN
Android
  
showSoftKeyboard($value:Boolean):void
Android
  
startSafeBrowsing($callback:Function = null):void
Starts Safe Browsing initialization.
Android
Property Detail
airPrefixEnabledproperty
airPrefixEnabled:Boolean

Set this property to false if you have forced your AIR app to drop the "air." prefix when packaging the .apk file

Default value is true. Notice that all AIR applications will have the "air." prefix added to their package name on Android automatically. If you are manually removing the "air." prefix, you need to set this property to false. otherwise leave it as it is.


Implementation
    public function get airPrefixEnabled():Boolean
    public function set airPrefixEnabled(value:Boolean):void
cookieManagerproperty 
cookieManager:Cookies  [read-only]

Returns a reference to the global Cookies class in Android.


Implementation
    public function get cookieManager():Cookies
embeddedBrowserproperty 
embeddedBrowser:EmbeddedBrowser  [read-only]

Returns a reference to the CustomTab in Android.


Implementation
    public function get embeddedBrowser():EmbeddedBrowser
safeBrowsingPrivacyPolicyUrlproperty 
safeBrowsingPrivacyPolicyUrl:String  [read-only]

Returns a URL pointing to the privacy policy for Safe Browsing reporting.

Workd on Android 27+


Implementation
    public function get safeBrowsingPrivacyPolicyUrl():String
webContentsDebuggingEnabledproperty 
webContentsDebuggingEnabled:Boolean  [write-only]

Enables debugging of web contents (HTML / CSS / JavaScript) loaded into any WebViews of this application. This flag can be enabled in order to facilitate debugging of web layouts and JavaScript code running inside WebViews. Please refer to WebView documentation for the debugging guide.

The default is false.

Workd on Android 27+


Implementation
    public function set webContentsDebuggingEnabled(value:Boolean):void
webviewDatabaseproperty 
webviewDatabase:WebViewDatabase  [read-only]

Returns a reference to an instance of WebViewDatabase class


Implementation
    public function get webviewDatabase():WebViewDatabase
Method Detail
enableSlowWholeDocumentDraw()method
public function enableSlowWholeDocumentDraw():void

Enabling drawing the entire HTML document has a significant performance cost. This method should be called before any WebViews are created.

Must be called if you want to take screenshots of the webpage.

Workd on Android 21+

getInstance()method 
public function getInstance($x:int = 0, $y:int = 0, $width:int = 200, $height:int = 200):WebView

Returns a new instance of WebView window. This window will be visible after you call the addView method of the returned instance.

Parameters

$x:int (default = 0)
 
$y:int (default = 0)
 
$width:int (default = 200)
 
$height:int (default = 200)

Returns
WebView
moveAndroidTaskToBack()method 
public function moveAndroidTaskToBack():Boolean

Move the AIR activity to the back of the activity stack.

Returns
Boolean — If the task was moved (or it was already at the back) true is returned, else false.
safeBrowsingWhitelist()method 
public function safeBrowsingWhitelist($arr:Array, $callback:Function = null):void

Sets the list of hosts (domain names/IP addresses) that are exempt from SafeBrowsing checks. The list is global for all the WebViews.

Workd on Android 27+

Parameters

$arr:Array — The list of hosts. This value must never be null.
 
$callback:Function (default = null) — callback function expects one parameter as Boolean. will be called with true if hosts are successfully added to the whitelist. It will be called with false if any hosts are malformed.

setSoftInputMode()method 
public function setSoftInputMode():void

Specify an explicit soft input mode to use for the window, as WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN

showSoftKeyboard()method 
public function showSoftKeyboard($value:Boolean):void

Parameters

$value:Boolean

startSafeBrowsing()method 
public function startSafeBrowsing($callback:Function = null):void

Starts Safe Browsing initialization. URL loads are not guaranteed to be protected by Safe Browsing until after callback is invoked with true. Safe Browsing is not fully supported on all devices. For those devices callback will receive false.

This should not be called if Safe Browsing has been disabled by manifest tag.

Workd on Android 27+

Parameters

$callback:Function (default = null) — callback function expects one parameter as Boolean. true if initialization is successful, false otherwise.