Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - [Appli exit] How to execute code before exiting application?

[Appli exit] How to execute code before exiting application?

Put your problem here if it does not fit any of the other categories.

[Appli exit] How to execute code before exiting application?

Postby Syl » Tue Nov 17, 2009 11:29 am

I develop an application with several activities.

When the application starts, it goes into InitActivity and it makes some initializations.
For example, it starts a thread that sends periodically a network request toward a server (keep-alive mechanism).


My problem is "how to process operations before exiting the application ?" (typically, to stop the keep-alive thread).
My idea is to make a forward to an ExitActivity before exiting.


It would be easy if I had only one activity in my app. I would use onCreate() and onDestroy() methods to process init and end operations.


I manage to handle BACK Key press (using onKeyDown() method in the activities) but I don't manage to catch the HOME key...

Do you know how to execute code just before exiting the application ?

Thanks for you help !
Syl
Junior Developer
Junior Developer
 
Posts: 14
Joined: Wed Oct 21, 2009 11:03 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 9 guests