Under Review
over 2 years ago

SDK 4.2.0 Beta 1 won't compile AppBase.getProperty

Given

  return Application.getApp().getProperty(s);
The compiler reports
  ERROR: fr235: test.mc: '$.Toybox.Application.AppBase.getProperty' is deprecated.
But fr235 doesn't support Application.Properties.getValue, so I *have* to use getProperty when compiling for fr235.
Parents
  • is there a way to change any of these Property, StorageValue, etc. directly from the watch?

    Well, you can call Storage.setValue() and Properties.setValue() from any device that supports those APIs. But the issue is how to present a UI for doing that. Prior to sdk-3.2.0, you couldn't do that with watch faces, or data fields, for example. But for devices that support 3.2.0 or later, you can add a getSettingsView() method to your main app class. See "On Device Watch Face and Data Field Settings" at the bottom of this page.

Comment
  • is there a way to change any of these Property, StorageValue, etc. directly from the watch?

    Well, you can call Storage.setValue() and Properties.setValue() from any device that supports those APIs. But the issue is how to present a UI for doing that. Prior to sdk-3.2.0, you couldn't do that with watch faces, or data fields, for example. But for devices that support 3.2.0 or later, you can add a getSettingsView() method to your main app class. See "On Device Watch Face and Data Field Settings" at the bottom of this page.

Children