force close app programmatically lazarus / 43-Android ---------------------------------------------------------------------- polypress · 2013-09-29 15:55 How do you close an android app from Lazarus programmatically? Using halt stops it on the screen but it still runs in the background. You can remove it in the apps screen but I prefer to do it automatically. ---------------------------------------------------------------------- taazz · 2013-09-29 18:32 application.exit, or simple closing the main form of the application should do it. ---------------------------------------------------------------------- polypress · 2013-09-30 05:07 I couldn't find application.exit, but I tried application.terminate, application.destroy, form1.close, halt and none would remove the app from the list of open apps. They paused the app, but they didn't kill it. Regards ---------------------------------------------------------------------- Mujie · 2013-09-30 05:12 Application.Free ? ---------------------------------------------------------------------- taazz · 2013-09-30 05:17 I'm going to let some one else with more experience on Android to answer this but if application.free or mainform.close does not remove the application from the memory then I can think of 2 thinks 1) it needs some time to clean up its memory. 2) there is a bug that needs to be addressed. ---------------------------------------------------------------------- polypress · 2013-09-30 08:26 Problem solved. It wasn't a lazarus issue; it was an android issue. The app had closed OK but it was listed in the recent apps. I misinterpreted that screen. You just need to add to manifest excludeFromRecents= "true" Thanks for your all your help. Regards