Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
How to detect if a Symbian device is in offline mode
This article shows how to detect whether a Symbian device is in "offline" mode by querying the device profile.
We need to Query Central Repository.
CRepository* cRepository = CRepository::NewLC( KCRUidProfileEngine );
CurrentProfileId will be used to hold the current active profile id.
Get current profile Id.
//KProEngActiveProfile is the id of the currently active profile.
User::LeaveIfError( cRepository->Get( KProEngActiveProfile, CurrentProfileId ) );
Check CurrentProfileId to determine the active profile.
Possible values of CurrentProfileId can be one of the following:
- 0 = General profile (default value)
- 1 = Silent profile
- 2 = Meeting profile
- 3 = Outdoor profile
- 4 = Pager profile
- 5 = Off-line profile
- 6 = Drive profile
- 30-49 = User-created profiles
if ( CurrentProfileId == 5 )
// It means that the current profile is in the offline mode.
// Similarly you can check for any active profile by comparing the