| ID | CS000815 | Creation date | February 8, 2008 |
| Platform | S60 3rd Edition | Tested on devices | |
| Category | Symbian C++ | Subcategory | Imaging, Application Framework |
| Keywords (APIs, classes, methods, functions): |
In order to find out whether the Camera application is running, TApaTaskList class can be used to retrieve a list of currently running tasks.
Note that on some devices, such as the Nokia N93 and the Nokia N93i, the Camera task is always running in the background and only hidden from the list of active task when in background.
The following function returns ETrue if the Camera is running and not hidden from the list of active tasks.
Capability requirements: none
#include <apgtask.h> // link against apgrfx.lib
#include <apgwgnam.h>
// The UID of the native camera application
const TUid KNativeCameraAppUID = { 0x101ffa86 };
TBool CheckCameraStatusL()
{
TUid id( KNativeCameraAppUID );
TApaTaskList taskList( iWsSession ); // iWsSession is of type RWsSession
TApaTask task = taskList.FindApp( id );
if( task.Exists() )
{
CApaWindowGroupName* wgName =
CApaWindowGroupName::NewLC( iWsSession, task.WgId() );
TBool isHidden = wgName->Hidden();
CleanupStack::PopAndDestroy(); // wgName
if(!isHidden)
{
return ETrue;
}
}
return EFalse;
}
No related wiki articles found