Detect the uninstall event inside the application

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
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();
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)

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

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.