Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Operating Systems
»
Android
»
force close app programmatically
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
I hope FreePascal can sup...
by
marcov
[
Today
at 06:03:54 pm]
FPC 3.2.4-rc1 available
by
Fred vS
[
Today
at 05:45:33 pm]
FPC Unleashed (inline var...
by
ccrause
[
Today
at 04:10:31 pm]
Elite Arcade
by
Guva
[
Today
at 03:41:28 pm]
Building units fails afte...
by
NormanDunbar
[
Today
at 03:36:38 pm]
Little bit...
by
Thaddy
[
Today
at 02:19:01 pm]
[SOLVED] Cannot build Uni...
by
Thausand
[
Today
at 02:18:34 pm]
default pin settings, atm...
by
ccrause
[
Today
at 11:45:37 am]
TChart how setup nicestep...
by
eldonfsr
[
Today
at 05:18:14 am]
AI assisted translation o...
by
schuler
[
Today
at 03:07:59 am]
Can I get the position an...
by
wp
[
Today
at 12:23:04 am]
Translate .lfm file in a ...
by
wp
[
Today
at 12:07:11 am]
Playing video without to ...
by
n7800
[April 17, 2026, 11:51:39 pm]
Delimited text - how find...
by
n7800
[April 17, 2026, 11:28:25 pm]
overloading issues fpc3.2...
by
Martin_fr
[April 17, 2026, 10:21:07 pm]
Ann: Deinline: a de-inlin...
by
LeP
[April 17, 2026, 09:58:08 pm]
Seeking advice on setting...
by
schuler
[April 17, 2026, 03:36:28 pm]
Ann: DeCoperators
by
DomingoGP
[April 17, 2026, 03:23:39 pm]
Error: Compilation raised...
by
marcov
[April 17, 2026, 02:44:06 pm]
TLazSerial : serial port ...
by
CM630
[April 17, 2026, 09:50:34 am]
[Solved] Help needed comp...
by
landolfi
[April 17, 2026, 02:45:10 am]
DataPort or Synpase stat...
by
eldonfsr
[April 16, 2026, 11:32:18 pm]
[FPC 3.2.4, Windows] PTC ...
by
Fred vS
[April 16, 2026, 08:26:24 pm]
IDE: Property editor does...
by
dsiders
[April 16, 2026, 07:04:22 pm]
What is wrong with this c...
by
OH1KH
[April 16, 2026, 04:32:48 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: force close app programmatically (Read 11732 times)
polypress
Jr. Member
Posts: 91
force close app programmatically
«
on:
September 29, 2013, 05:55:05 pm »
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.
Logged
taazz
Hero Member
Posts: 5368
Re: force close app programmatically
«
Reply #1 on:
September 29, 2013, 08:32:24 pm »
application.exit, or simple closing the main form of the application should do it.
Logged
Good judgement is the result of experience … Experience is the result of bad judgement.
OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64
polypress
Jr. Member
Posts: 91
Re: force close app programmatically
«
Reply #2 on:
September 30, 2013, 07:07:35 am »
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
Logged
Mujie
Jr. Member
Posts: 64
Re: force close app programmatically
«
Reply #3 on:
September 30, 2013, 07:12:49 am »
Application.Free ?
Logged
taazz
Hero Member
Posts: 5368
Re: force close app programmatically
«
Reply #4 on:
September 30, 2013, 07:17:33 am »
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.
Logged
Good judgement is the result of experience … Experience is the result of bad judgement.
OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64
polypress
Jr. Member
Posts: 91
Re: force close app programmatically
«
Reply #5 on:
September 30, 2013, 10:26:55 am »
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
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Operating Systems
»
Android
»
force close app programmatically
TinyPortal
© 2005-2018