Community: Wiki

你在这里: You Are Here: Olet tässä: Vous êtes ici: Sie befinden sich hier: Tu sei qui: 現在のページ: Você está aqui: Вы здесь: Usted está aquí:
This page was last modified 11:05, 30 October 2008.

TSS000268 - How to get a notification of user activity when the device has been idle?

From Forum Nokia Wiki



ID TSS000268 Creation date July 21, 2005
Platform S60 platform
Series 80 1st Edition
Series 80 2nd Edition
Devices
Category Symbian C++ Subcategory General


Keywords (APIs, classes, methods, functions):

Overview

How to get a notification of user activity when the device has been idle?

Description

How to implement a mechanism that gives an application a notification of user activity when the device has been idle?

Solution

Write an "Activity Manager" CTimer that monitors InactivityTime. When the CTimer launches, do
TTimeIntervalSeconds inactiveTime = User::InactivityTime();
if (inactiveTime < KMyActivityManagerTimerInterval)
    {
    CTimer::Cancel();
    NotifyApplicationOfUserActivityL();
    }

Summary

You can implement an "Activity Manager" by using CTimer. When the timer launches, compare the timer interval to Inactivity Time. If the Inactivity Time is smaller than the timer interval, you know that there has been activity while the timer was counting.

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Invite a friend Invite a friend
E-mail Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us Regional websites: Chinese Japanese © 2008 Nokia