I invocker Active Member Aug 23, 2021 #1 I have two problem 1 - I declare a global variable x as int when activity was Loaded I inc(x) x= 1 then activity.finish and service still running the problem is th variable x is x = 0 and not x= 1 why ? I declare variable x as int from starter 2 - How can call activity again from service when it finish I use callsub and callsubdelay but not work I set a stub test then call it from service and not work again
I have two problem 1 - I declare a global variable x as int when activity was Loaded I inc(x) x= 1 then activity.finish and service still running the problem is th variable x is x = 0 and not x= 1 why ? I declare variable x as int from starter 2 - How can call activity again from service when it finish I use callsub and callsubdelay but not work I set a stub test then call it from service and not work again
I invocker Active Member Aug 24, 2021 #2 the first one can't saving a variable in memory for that I save it in disk and read it from their B4X: Copy save = File.ReadString(File.DirRootExternal, "save.txt") 2 - resolve it B4X: Copy StartActivity(Main) Thank you Last edited: Aug 24, 2021 Upvote 0
the first one can't saving a variable in memory for that I save it in disk and read it from their B4X: Copy save = File.ReadString(File.DirRootExternal, "save.txt") 2 - resolve it B4X: Copy StartActivity(Main) Thank you
Erel B4X founder Staff member Licensed User Longtime User Aug 24, 2021 #3 Code with File.DirRootExternal = broken code. Not sure what you are doing and why you are using services. You need to provide more information. Best to switch to B4XPages. Upvote 0
Code with File.DirRootExternal = broken code. Not sure what you are doing and why you are using services. You need to provide more information. Best to switch to B4XPages.