×
Namespaces

Variants
Actions

Archived:Setting access point ID for Browser Control Interface has no effect in S60 3rd Edition, Feature Pack 1 (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Setting the access point ID for Browser Control Interface (CBrCtlInterface) does not have any effect in S60 3rd Edition, Feature Pack 1 devices.

Article Metadata
Compatibility
Platform(s): S60 3rd Edition, Feature Pack 1
S60 3rd Edition FP1
Article
Keywords: SetBrowserSettingL
Created: User:Technical writer 1 (31 Aug 2007)
Last edited: hamishwillee (21 Jun 2012)

Description

In S60 3rd Edition, the access point to be used for the Browser Control Interface can be set with

iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsApId, apId );

After this, the access point with the specified ID (apId) will be used for the network connection automatically, without prompting the AP selection dialog.

In S60 3rd Edition, Feature Pack 1, a different Browser engine is used for Browser Control Interface. Calling the above function with a valid access point has no effect, and the access point selection dialog is shown every time when opening a URL using this API.

Solution

MBrCtlSpecialLoadObserver class has a virtual NetworkConnectionNeededL() member function that is called every time when a network connection is needed. A new class must be inherited from MBrCtlSpecialLoadObserver and this class has to implement its own network connection in the NetworkConnectionNeededL() function. The object of this user-implemented class can be passed as a parameter to CreateBrowserControlL() which creates the browser controller.

CMySpecialLoadObserver member variables

 RSocketServ iSocketServer;
RConnection iConnection;
TBool iFirstTime; //Initial value should be ETrue
 
void CMySpecialLoadObserver::NetworkConnectionNeededL(
TInt* aConnectionPtr,
TInt* aSockSvrHandle,
TBool* aNewConn,
TApBearerType* aBearerType )
{
*aBearerType = EApBearerTypeAllBearers;
 
if(iFirstTime)
{
//New connection is established only once
User::LeaveIfError(iSocketServer.Connect(KESockDefaultMessageSlots));
User::LeaveIfError(iConnection.Open(iSocketServer, KConnectionTypeDefault));
TCommDbConnPref prefs;
prefs.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
prefs.SetDirection(ECommDbConnectionDirectionOutgoing);
prefs.SetIapId(2); //preferred IAP
User::LeaveIfError(iConnection.Start(prefs));
*aNewConn = ETrue;
iFirstTime = EFalse;
}
else
{
*aNewConn = EFalse;
}
 
*aConnectionPtr = reinterpret_cast<TInt>(&iConnection);
*aSockSvrHandle = iSocketServer.Handle();
return;
}
This page was last modified on 21 June 2012, at 09:06.
62 page views in the last 30 days.
×