×
Namespaces

Variants
Actions

Detect the uninstall event inside the application

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: vin2ktalks (03 Apr 2007)
Last edited: hamishwillee (20 Jul 2012)

Following information is correct for shutting down of system, not for uninstalling. I found some pointers which suggest that there is no way that we can get uninstall event. I also tried following code, but didn't get any event.


It is possible to find the uninstall or abnormal exit of an application from inside your application if you are using the Symbian application framework. You have to override the CCoeAppUi::HandleSystemEventL(const TWsEvent &aEvent) to your AppUi class. Whenever a system event is generated, this function will get invoked. The paramerter aEvent will give you more information. Now check the following code, which is used to detect the uninstall event of an application.

void CMyAppUi::HandleSystemEventL(const TWsEvent& aEvent)
{
TApaSystemEvent systemEvent = *(TApaSystemEvent*)aEvent.EventData();
 
switch(systemEvent)
{
case EApaSystemEventShutdown:
// TODO: Do what ever is necessary here.
// An example would be authenticate the user.
// and if the authentication got succeed call
// HandleCommandL(EEikCmdExit)
break;
default:
break;
}
}

This page was last modified on 20 July 2012, at 09:11.
40 page views in the last 30 days.
×