RConnection::Start never retrun
Hello,
on hardware
TInt connstat = iConnection.Start (iPreference);
never return if there is no network. (return an error on emulator)
Please help! I need to have a non connectivity in my app. I've try to use timer but at this line the app is totaly bloced.. and if i use the asynchronous Start the iStatus stay pending...
How can I see if there is connectivity or not without blocking the phone??
Re: RConnection::Start never retrun
hi ,
Use this code
[CODE]TBool CHTTPExampleEngine::CheckConnection(TUint32& aIAPId)
{
if(!iConnected)
{
#ifndef __WINS__
TCommDbConnPref prefs;
prefs.SetBearerSet(ECommDbBearerUnknown);
prefs.SetDirection(ECommDbConnectionDirectionOutgoing);
prefs.SetIapId(aIAPId);
prefs.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
if (!IsActive())
{
iConnection.Start(prefs, iStatus);
iIAPID=aIAPId;
SetActive();
}
#endif
}
#ifndef __WINS__
return iConnected;
#else
return ETrue;
#endif
}[/CODE]