JohnC Expert Licensed User Longtime User Jun 30, 2021 #1 For some reason I had the below line in Service_Start: B4X: Copy Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS And I didn't realize that this misplacement caused that setting to not work as desired. It wasn't until I noticed that the intellisense said "Should be set in Service_Create". I'm thinking it would be helpful if the compiler could throw a warning (or display the red wavy underline warning during edit mode) when it sees that this setting is not in the correct sub, because when it's placed in the wrong location, it is not very noticeable that it is not working as desired. NOTE: I am using B4A v9.01 Last edited: Jul 1, 2021
For some reason I had the below line in Service_Start: B4X: Copy Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS And I didn't realize that this misplacement caused that setting to not work as desired. It wasn't until I noticed that the intellisense said "Should be set in Service_Create". I'm thinking it would be helpful if the compiler could throw a warning (or display the red wavy underline warning during edit mode) when it sees that this setting is not in the correct sub, because when it's placed in the wrong location, it is not very noticeable that it is not working as desired. NOTE: I am using B4A v9.01