Watchface - Background process communication and possible error (on 5X)

Former Member
Former Member
Guys,

As I wrote watchface with weather forecast presentation - I met the issue of preserving number of calls to FX provider and still be reactive to user parameters change.
What I did was passing information to the background process whether request should be sent (or just quit the process) through Storage

1. Is there any other method to pass information to the background process? Storage seems to 'mostly' work (old method - Parameters - is useless - as values are not stored till OnStop method)

2. I met on real device from time to time error:

Error: File Not Found Error
Details: 'Failed invoking <symbol>'
Time: 2018-12-31T15:03:00Z
Part-Number: 006-B2604-00
Firmware-Version: '12.00'

as I checked stack - it pointed to Storage.getValue
So seems that sometimes real device is not able to open / find Storage (???)
  • I always use the "old" object store to pass info (like current location), or pull data from app settings (like an API key). Application.getApp().getProperty() in the background and setProperty() in the main app with no problem. (they are available until CIQ4).

    How much is in your Application.Storage? Maybe an issue due to size.

  • Former Member
    Former Member
    Hi Jim

    Sorry, should write "Property" not "Parameters"

    setProperty is not working in configuraiton of watchface + background process - as it is not stored till OnStop is called for watchface. Due to that background process will get last stored value, not the recent one.
    BTW - till I realised that (it is cleary written in the BLOG, not really in API documentation) I lost almost a week :(

    Size issue? Shouldn't be... 72*int + string + 5 int - what gives roughtly at maximum 400 bytes.
    I'll report later a bug anyway - as this error happens under simulator too.

    Thanks