Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IWebClient

interface IWebClient
Extends com.amazon.apmf.IStandard HeadlessWebRuntime Client callback interface provides way for clients to listen for status updates and override HeadlessWebRuntime behavior.

Methods

onLoadStarted()

void onLoadStarted(string url)
Notify the host application when the page loading started.

Parameters

url
string — Required

onLoadFinished()

void onLoadFinished(string url)
Notify the host application when the page loading finished.

Parameters

url
string — Required

shouldOverrideWebRequest()

bool shouldOverrideWebRequest(WebRequest* request)
Provides chance for host application to allow/deny the page navigations. Note that this callback comes only for main frame navigation requests and not for sub frames or sub resources (for ex: image, scripts etc..) By default navigations are canceled.

Parameters

request
WebRequest* — Required Web Request object that contains request information.

Returns

bool bool true to cancel the current loading, false otherwise

onReceivedError()

void onReceivedError(WebRequestError* error)
Notifies the host application on web resource loading errors. This will be called for all resources - images/iframes/main page.

Parameters

error
WebRequestError* — Required Web request error object contains error information.
Last modified on October 29, 2026