B4A Question How to destroy FirebaseMessaging programmatically? - DonManfred (first post)    Dec 18, 2021   (1 reaction) StopService(servicename) B4A Question Is it valid for Service_Destroy event to not be called when OS kills service? - Erel (first post)    Jan 29, 2023   (1 reaction) STOP:
1. You call StopService.
2. The OS stops non-foreground services after about a minute when the app is in the background.
KILL PROCESS:
1. App is in the background and the OS decides that the app should no longer run. It can happen after a minute or after 10 hours. Depends on many factors. B4A Question Tracking only with open app - JohnC (first post)    Aug 14, 2024   (1 reaction) Put the StopService in the Activty_Pause event sub of your app.
And then restart the service in the Activity_Resume sub B4A Question Problem with Starter Service - marcick (first post)    Sep 27, 2016 Ok, understand how it works.
StopService(Starter) stop the service but not in a way it is started again when you restart the App (maybe after some time but not immediately).
Need to do some modifications.
Thanks B4A Tutorial Background location tracking - Erel (first post)    Dec 04, 2018   (5 reactions) Neither. This app is intended to always run so it is never stopped. Call StopService(<service name which I don't remember>) if you want to stop it.
BTW, it is already running for 5 days here without any interruption. B4A Question Unfortunately 'MyApp' has stopped working - Erel (first post)    Feb 06, 2020   (1 reaction) Please, no need to fight.
This is a valid question and there is no doubt that the documentation should be updated. I've fixed it for the next update.
In the first versions of B4A the various keywords that accept an activity or module parameter only worked with strings:
StartActivity("Activity2")
B4A Question [SOLVED] StopAutomaticForeground when the task completes - Erel (first post)    Mar 15, 2018   (1 reaction) No. You shouldn't call it in that case.
You should either call StopService(Me) or Service.StopAutomaticForeground when it is no longer important that the service will be kept in foreground mode. B4A Question How can I stop a service from within itself? - JohnC (first post)    Apr 03, 2023 Try reversing the two statments to this order:
CancelScheduledService(Me)
StopService(Me)
Because the Stopservice line might be immediately killing the service on that line and never running the next line of "cancelscheduledservices", so the Last startserviceat time you set will still be executed B4A Tutorial Starter Service - Consistent & Single Entry Point - Erel (first post)    Mar 30, 2016   (1 reaction) Yes. It will be running until Android kills the process.
You can call StopService (Starter) if you like to manually stop it. B4A Question Stop a running application - lemonisdead (first post)    Jun 13, 2017   (1 reaction) Hello, You have several options depending how you want it to be : - if only closing an Activity : Activity.Finish - if closing ALL the whole app, be sure to previously stop any service, timer, background task and than ExitApplication (if you don't stop anything, the System would produce some errors) Page: 1   2   3   4   5   6   7   Powered by ColBERT |