Detecting offline mode using Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search

Article Metadata
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Created: User:Technical writer 2 (04 May 2006)
Last edited: hamishwillee (14 Jun 2012)


Detecting offline mode


In S60 3rd Edition, offline mode is detected via reading the phone settings from the Central Repository.
To get the active profile setting, only one call to the Central Repository is needed:
#include <centralrepository.h>
#include <ProfileEngineSDKCRKeys.h>
CRepository* cr = CRepository::NewLC( KCRUidProfileEngine );
TInt value;
// Get ID of current profile
User::LeaveIfError( cr->Get( KProEngActiveProfile, value ) );
// Check value to determine the active profile
if ( value == 5 )
    // current profile is the offline profile
// ...
For more information about the Profile Engine, see the SDK help documentation and "Profiles Engine Active Profile Settings API."

This page was last modified on 14 June 2012, at 08:20.
40 page views in the last 30 days.