Hello,
First of all excuse my ignorance, I am a beginner in B4A.
I will try to explain my problem in detail.
I have an application that works as a calendar.
In the first run it creates the database, searches the data on the web and updates the local database (SQLite). It works 100%.
With the app open or the screen active, it does the calendar event checking routine every 30 seconds on the local database, issuing notifications when needed and every 30 minutes synchronizes with the web. Also 100% operational.
This verification operation is divided into 2 services.
1. ServiceAMF: Check the local database every 30 seconds.
2. SynchronizeAMF: Synchronization routines with the web database.
I call the services when the app starts, in the Starter, through the StartService.
In the Service_Start of the called service, I schedule through the StartServiceAt (Me, DateTime.Now + (30 * 1000), True) in the case of ServicoAMF.
When the service terminates the check routine it is closed through the StopService ("").
The active SmartPhone works normally.
When the screen is locked, the service starts and is terminated by the system.
How do I get the service running all the time?
It can be through the StartService, StartServiceAt or any other routine.
First of all excuse my ignorance, I am a beginner in B4A.
I will try to explain my problem in detail.
I have an application that works as a calendar.
In the first run it creates the database, searches the data on the web and updates the local database (SQLite). It works 100%.
With the app open or the screen active, it does the calendar event checking routine every 30 seconds on the local database, issuing notifications when needed and every 30 minutes synchronizes with the web. Also 100% operational.
This verification operation is divided into 2 services.
1. ServiceAMF: Check the local database every 30 seconds.
2. SynchronizeAMF: Synchronization routines with the web database.
I call the services when the app starts, in the Starter, through the StartService.
In the Service_Start of the called service, I schedule through the StartServiceAt (Me, DateTime.Now + (30 * 1000), True) in the case of ServicoAMF.
When the service terminates the check routine it is closed through the StopService ("").
The active SmartPhone works normally.
When the screen is locked, the service starts and is terminated by the system.
How do I get the service running all the time?
It can be through the StartService, StartServiceAt or any other routine.