This is more of a curiosity thing, but I have watchfaces that do sunrise/sunset by way of a barrel (that's where currentLocation is used). Right now, I set positioning for the WF, but not the barrel, and it seems to work. But should it? I'm wondering if positioning should also be needed on the barrel.
I experimented a little bit with this, and this is a case a "should", not "must". The reason is that ultimately, it's up to the app to specify the required permission in order to use the barrel's feature in this case. I think it would be courteous of a barrel author to add the Position permission in this case because it's going to force an author to enable the permission on their app to use the barrel's features. Otherwise, the barrel will appear to not work (in this example, currentLocation will just return null).
So I added the permission to the barrel, and the WF still ran fine, but then removed the permission from the WF, and I get a compile error right away that the barrels has the permission while the WF doesn't.
Next app I do with this barrel, I'll be reminded to set it in the main app!
Jim - any chance you could post a simple barrel example like sunrise/sunset. I'd like to start using barrels, but I'd really love to adopt a best practice approach, and I would trust your implementation to learn from.
Mines based on some code that was posted here, but is a bit custom as it includes things like caching the last known lat/lon in storage. Stanislav.Bures posted his sunrise/sunset barrel here not long ago. I'd definitely trust Stanislav's version!
Jim - maybe I'm missing something, but that link includes a ZIP file from Stanislav with only a binary for the barrel logic. And there is a little code snipit, an example that calls the barrel. I think I'm looking for an example with the barrel code so I can build a barrel and then use it in my data field.
To use the barrel, you just configure it as part of your project, and really only need the code on how to use the barrel. The programmer's guide shows how to create and use a simple barrel, and in the "Unlocking Barrels" section, there's a link to a github repository with a couple of full samples.(github.com/garmin/connectiq-apps)
By the way, the semicircle barrel in the repository does NOT look like this! :)