On a Venu 2 Plus build the Settings, Trigger App Settings in the Simulator.
Is there a way to test changing the App Settings in the Simulator?
On a Venu 2 Plus build the Settings, Trigger App Settings in the Simulator.
Is there a way to test changing the App Settings in the Simulator?
What you are trying ti use is for on-device settings (watch faces and DFs.
For app settings, you use File>Edit Persistent Storage>Edit Application.Properties data
1. no, sorry I misunderstood I thought the problem was in the simulator.
On actual watch you might be able to log some things. It takes lot of time. If it doesn't involve settings (or it's ok to go with…
What you are trying ti use is for on-device settings (watch faces and DFs.
For app settings, you use File>Edit Persistent Storage>Edit Application.Properties data
Thanks, I tried all 3 options of Edit Persistent Storage and none were operational.
Though for the app installed on the device I see all the defined elements and can change them, but sometimes it also crashes the app and the properties never get updated.
If you change an element in the Connect IQ Settings for the app, doesn't it automatically set the corresponding property to the new value? It seems not to.
Obviously something is not defined as it should be and finding examples and documentation on what is needed is hard, can you point to a simple working example.
If you change app settings while your app is running, onSettingsChanged in your AppBase will be called. How changing settings is handled by your app is dependent on how your app handles the changes.
What SDK are you using? Edit Application.Properties data will give you the settings screen but you may get a message that your app has no settings
Using SDK 4.1.5
The onSettingsChanged in the AppBase
contains
var TimerPeriod = Application.getApp().getProperty("TimerPeriod");
But as the Simulator has no possibility to test changing App settings there is no way to test this.
Making the app settings changes on the actual device crashes the app.
Impasse.
properties.xml
<property id="TimerPeriod" type="number">5</property>
settings.xml
<setting propertyKey="@Properties.TimerPeriod" title="Default Timer Period (minutes)">
<settingConfig type="numeric" />
</setting>
Look at the objectstore sample in the SDK as it uses app setting so you can see how to change them in the sim
Where you have
var TimerPeriod =....
TimerPeriod is a local variable to onSettingsChanged. You don't want it to be local to that function.
Thanks, Have got it working in the Simulator, as you suggested with
For app settings, File>Edit Persistent Storage>Edit Application.Properties data
However it crashes the app on the device when saving settings changes, any idea how to debug this?
On the device. under garmin\apps\logs you'll see ciq_log.yml which tells you about the crash.
Thanks, am new to this environment, in the log it shows
Stack:
- pc: 0x10001be3
- pc: 0x10001324
Any idea where one can find the error or the mapping to the line number?
Thanks for your help, couldn't work out from the logs what or where the problem was.
Started again and now it works. Yeah!
Btw, Is it normal that Connect IQ doesn't see the latest upload most often it sees the previous one?