Symbian3/PDK/Source/GUID-7FCDBDFB-6548-52D2-A18D-608FC8F151A3.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 14 578be2adaf3e
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-7FCDBDFB-6548-52D2-A18D-608FC8F151A3"><title>Activity Manager Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>Activity manager is a Symbian platform component used by other components to monitor and react to user activity on the device. </p> <section><title>Activity Manager library details</title> <p>The DLL that provides the functionality and the library to which the code must link is identified below. </p> <table id="GUID-E0781500-91C9-57F3-8825-F583A3CC2E6A"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><thead><row><entry>DLL</entry> <entry>LIB</entry> </row> </thead> <tbody><row><entry><p> <codeph>activitymanager.dll</codeph>  </p> </entry> <entry><p> <codeph>activitymanager.lib</codeph>  </p> </entry> </row> </tbody> </tgroup> </table> </section> <section><title>Description</title> <p>Activity manager is typically in one of the two states, active or inactive, reflecting activity or inactivity on the device. It plays a vital role in implementing functionality such as power management and screen savers. When it passes from one state to the other, it launches a default set of actions to respond to the change. The typical responses are restoring the power when entering a period of activity or bringing up a screen saver when entering a period of inactivity. </p> <p>The responses to activity and inactivity are implemented as callback functions which are passed to the activity manager by its <codeph>Start()</codeph> function. There are two of them, the active callback and the inactive callback. </p> <p>Inactivity is defined as a lack of activity for a specified period, the inactivity interval. The value of the inactivity interval is also passed to the Activity Manager by its <codeph>Start()</codeph> function. </p> <p>When an activity manager is inactive, it attempts to detect its activity. When a period of inactivity ends with the detection of activity, the activity manager: </p> <ul><li id="GUID-E77E653C-33EE-5BBF-9C93-B006D3A8485F"><p>calls the active callback </p> </li> <li id="GUID-443A6416-975E-52AB-8C1D-611D94AFD554"><p>enters the active state </p> </li> <li id="GUID-6F6C6646-0DFB-5F63-A9C3-A73374DABAD7"><p>starts monitoring inactivity. </p> </li> </ul> <p>When an activity manager is active, it attempts to detect its inactivity. When a period of activity ends with the detection of inactivity, the response varies. If the inactivity interval has been exceeded, or in other words if inactivity has lasted long enough to require a response, the activity manager: </p> <ul><li id="GUID-FCB841D8-C7E2-5FB4-8354-9D0A46CEE302"><p>calls the inactive callback </p> </li> <li id="GUID-BAC31F51-D684-5D8D-A169-BEC68C77CE87"><p>enters the inactive state </p> </li> <li id="GUID-64E8477A-28CE-59D3-AC16-D3530354B838"><p>starts monitoring activity </p> </li> </ul> <p>If the inactivity interval has not been exceeded, the Activity Manager reverts to monitoring inactivity. </p> </section> <section><title>APIs</title> <p>The key class of Activity Manager is as follows: </p> <table id="GUID-8DD92BF8-0CE1-5FF3-ABF3-8B06883108BA"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><thead><row><entry>API</entry> <entry>Description</entry> </row> </thead> <tbody><row><entry><p> <xref href="GUID-9159ADC6-DD8E-3DF7-A023-96E1ABCB14FC.dita"><apiname>CUserActivityManager</apiname></xref>  </p> </entry> <entry><p>Allows clients to easily monitor user inactivity and activity. </p> </entry> </row> </tbody> </tgroup> </table> </section> </conbody><related-links><link href="GUID-1941FC6C-4E2B-5549-96C8-6090DB0C40E1.dita"><linktext>Activity Manager Tutorial</linktext> </link> </related-links></concept>