KL7000F Member Licensed User Longtime User Aug 3, 2014 #1 Hi there, I have two widget services that are started by StartAtBoot. In each case, only one available. In each Serice_Start I have the following code. StateManager takes control widget that has been added. This is also stored correctly and also correctly read / recognized: Code: Copy Sub Service_Start (StartingIntent As Intent) ... If StartingIntent.Action = "android.intent.action.BOOT_COMPLETED" AND StateManager.GetSetting2("Widget", "Widget") = "Widget1x1" Then StopService("") End If ... End Sub Nevertheless, both widget services are started on boot. Without reboot, only after installation, everything works just fine. Someone an idea? greeting Andy
Hi there, I have two widget services that are started by StartAtBoot. In each case, only one available. In each Serice_Start I have the following code. StateManager takes control widget that has been added. This is also stored correctly and also correctly read / recognized: Code: Copy Sub Service_Start (StartingIntent As Intent) ... If StartingIntent.Action = "android.intent.action.BOOT_COMPLETED" AND StateManager.GetSetting2("Widget", "Widget") = "Widget1x1" Then StopService("") End If ... End Sub Nevertheless, both widget services are started on boot. Without reboot, only after installation, everything works just fine. Someone an idea? greeting Andy
Erel B4X founder Staff member Licensed User Longtime User Aug 4, 2014 #2 Shouldn't the second condition be: Code: Copy StateManager.GetSetting(..) <> "My Name..." Add some Log messages to see what exactly happens during boot. Upvote 0
Shouldn't the second condition be: Code: Copy StateManager.GetSetting(..) <> "My Name..." Add some Log messages to see what exactly happens during boot.
KL7000F Member Licensed User Longtime User Aug 5, 2014 #3 I have now found another way, which works well. A "Starter Service" regulates when booting the widget. Nevertheless, many thanks for your answer. Upvote 0
I have now found another way, which works well. A "Starter Service" regulates when booting the widget. Nevertheless, many thanks for your answer.