Hi guys,
I have 2 service app, App A & App B.
App A is just a simple app, no UI and has a service to display a notification on a certain time, for ex 1 hours.
App B is an app to set time for App A to display this notification.
On App A, the code to start a service is like this
On App B, I want to change RefreshTime by changing the value in KV.
The idea are :
- Stop Service (started by App A)
- change RefreshTime value
- restart service again
I tried StopService("") and CancelScheduledService("") on App B, but no avail.
Is it possible to stop service started by App A?
I have 2 service app, App A & App B.
App A is just a simple app, no UI and has a service to display a notification on a certain time, for ex 1 hours.
App B is an app to set time for App A to display this notification.
On App A, the code to start a service is like this
B4X:
Sub Service_Start (StartingIntent As Intent)
If KV.IsInitialized = False Then KV.Initialize(File.DirInternal, "KV") ' KV is a KeyValueStore
StartServiceAt( Me, DateTime.Now + KV.GetObject("RefreshTime"), True)
End Sub
On App B, I want to change RefreshTime by changing the value in KV.
The idea are :
- Stop Service (started by App A)
- change RefreshTime value
- restart service again
I tried StopService("") and CancelScheduledService("") on App B, but no avail.
Is it possible to stop service started by App A?