Launching a specific help topic from a Symbian application

Steps

  1. Open the .cpp file containing HandleCommandL(TInt aCommand).

  2. Add a menu item Ehelp by adding the following code in HandleCommandL(TInt aCommand):

    case EHelp:
    	{
    	if (FeatureManager::FeatureSupported(KFeatureIdHelp))
    		{
    		CArrayFix<TCoeHelpContext> *buf =  CCoeAppUi::AppHelpContextL();
    		HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), buf);
    		}
    	}
    You must also make appropriate standard arrangements for the Ehelp enum as you do for any menu item.
  3. Add the HelpContextL() function to define the topic that you want to launch from the application.

    The following code demonstrates how to define HelpContextL():

     _LIT(KCXHELPHelloworld_HLP_SETTINGS, "SAMPLE_HLP_TOPIC_1");
    CArrayFix<TCoeHelpContext>* CcshelphelloworldAppUi::HelpContextL() const
    	{
    	if (FeatureManager::FeatureSupported(KFeatureIdHelp))
    		{
    		CArrayFixFlat<TCoeHelpContext>* array = new (ELeave) CArrayFixFlat<TCoeHelpContext> (1);
    		CleanupStack::PushL(array);
    		array->AppendL(
    		TCoeHelpContext(KUidcshelphelloworldApp,
    		KCXHELPHelloworld_HLP_SETTINGS));
    		CleanupStack::Pop(array);
    		return array;
    		}
    	else
    		{
    		return NULL;
    		}
    	}
    Notes:
    • The preceding code snippet uses feature manager harness mechanism to launch a help topic from the Symbian application. If you want to use this mechanism, make sure you include <featmgr.h> and link LIBRARY featmgr.lib in your MMP file.

    • The Application UID of the application which needs to launch the application help must be in the protected range. For information on protected and unprotected range of UIDs, see UID Q & A (Symbian Signed).

  4. Integrate the application help with your Symbian application. For details, see Integrating and testing the application help.

Results

The device user can now launch the specific help topic from the Symbian application by performing the following steps:

  1. Launch the application and navigate to the application's view in which Ehelp menu item has been added.

  2. Click the menu item to launch the application help. This opens the help topic that you have linked.