> i dun really get what you are trying to say. 

I was just giving you some hints, but it sounds like they weren't
sufficient. If you can tell us what you're trying to do in more detail, we
may be able to provide better answers.

It sounds like you're using a time-limited demo and you want to prevent the
user from setting the date back to continue using the demo. It'd say this is
going overboard. Who wants to have their date set wrong? It's not worth it.
But if you do want to prevent the user from continuing to use your demo app
beyond the demo period, you can watch for sysAppLaunchCmdTimeChanged and
adjust your start-of-demo date accordingly, so that the difference between
the current date-time and the start-of-demo date-time is unaffected by the
date/time change. A better approach would be to count the number of days the
user has actually used your demo on, rather than just looking at elapsed
time. This lets the user try out your demo app occasionally over a long
period rather than all at once.

It sounds like you want to prevent your users from installing games. I won't
debate the merits of doing this. Your app can register to be notified when
HotSync completes. (It gets a sysAppLaunchCmdSyncNotify when it's installed
and when its database is changed, but not on every HotSync.) The
notification you want to register for is sysNotifySyncFinishEvent. When you
get this, you can use DmGetNextDatabaseByTypeCreator to enumerate the
installed apps. There is no API to determine which are in the "Games"
category. You could look for 'taic' 1000 resource containing "Games", but
this would be pretty hit-and-miss. Some games include this resource, so they
go into the "Games" category automatically, but many don't. You could easily
detect any newly installed application, as long as you don't care whether
it's a game or not, but keeping a list of application creator IDs in a
preference and comparing the current list of installed databases with the
old one.
-
Danny

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to