MBrCtlLinkResolver interface of Browser Control API does not work on S60 5th Edition (Known Issue)
Article Metadata
Tested with
Compatibility
Article
Description
The MBrCtlLinkResolver interface of the Browser Control API provides a callback mechanism for receiving the content of an embedded link or the content of a user-initiated load request. However, in S60 5th Edition devices the functions of this interface are not invoked when the links on an HTML page are clicked.
How to reproduce
1) Load any HTML page with links using the Browser Control API. You can use the standard Browser Control example available in the SDK.
2) Click on any of the links on the displayed HTML page.
Expected behaviour: The callback functions MBrCtlLinkResolver::ResolveLinkL() and MBrCtlLinkResolver::ResolveEmbeddedLinkL() must be invoked on clicking the links.
Actual behaviour: The callback functions are not invoked and the page is not loaded.
Solution
When creating the Browser Control instance, pass the entire screen area to the CreateBrowserControlL function.
Example:
void CBrCtlSampleAppContainer::ConstructL(const TRect& aRect)
{
iBrCtlInterface = CreateBrowserControlL(
this,
aRect, // pass the entire screen area.
iBrCtlCapabilities,
iCommandBase,
iBrCtlSampleAppSoftkeysObserver,
iBrCtlSampleAppLinkResolver,
iBrCtlSampleAppSpecialLoadObserver,
iBrCtlSampleAppLayoutObserver,
iBrCtlSampleAppDialogsProvider);
Note: The Browser Control instance must be initiated with ECapabilityClientNotifyURL and ECapabilityClientResolveEmbeddedURL capabilities to enable the callback interface.


(no comments yet)