J johnb4a Member Licensed User Longtime User Oct 31, 2012 #1 Hi, How can i read settings using preference manager in a service module. For example if i have two check boxes say A and B. What i want is if A is checked then in the widget the distance should display in kilometer and if B is checked then the widget should display it in miles. So how can i read the settings in service module. Some example will be a great help.
Hi, How can i read settings using preference manager in a service module. For example if i have two check boxes say A and B. What i want is if A is checked then in the widget the distance should display in kilometer and if B is checked then the widget should display it in miles. So how can i read the settings in service module. Some example will be a great help.
Erel B4X founder Staff member Licensed User Longtime User Nov 1, 2012 #2 Exactly the same as you read settings from an activity. Code: Copy Dim pm As PreferenceManager Dim v = pm.GetString("somekey") Upvote 0
Exactly the same as you read settings from an activity. Code: Copy Dim pm As PreferenceManager Dim v = pm.GetString("somekey")
J johnb4a Member Licensed User Longtime User Nov 2, 2012 #3 Thanks Erel for the help. One more thing how can i use statemanager in the same way? Thanks in advance. Upvote 0
Thanks Erel for the help. One more thing how can i use statemanager in the same way? Thanks in advance.
Erel B4X founder Staff member Licensed User Longtime User Nov 2, 2012 #4 StateManager saves the state of activities. It cannot work with services. You can however use the "settings" feature of StateManager. Upvote 0
StateManager saves the state of activities. It cannot work with services. You can however use the "settings" feature of StateManager.