Read-only archive of the All About Symbian forum (2001–2013) · About this archive

How to get the status whether the device can connect to network or not

0 replies · 1,449 views · Started 12 August 2004

Hi,
I want to get the status whether the device can connect to network or not, the code I used is below:
RSystemAgent sa;
sa.Connect();
TInt value = sa.GetState(KUidNetworkStatus);
LogFile::WriteInteger(value, _L("isOnWirelessNetwork"😉);
sa.Close();

if(value == ESANetworkAvailable)
ret = false;
But it seems not work, the value outputed is always KErrUnknown, does any help?
Thanks a lot!
sitar