Changes to the Position Permission

I'd like to direct everyone to this recent post on the develop blog:

https://developer.garmin.com/index.php/blog/post/changes-to-the-position-permission

TL;DR, if your apps use Toybox.Activity.Info.currentLocation, enable the Position permission and re-build your app before June 30th because GDPR. :)
  • But in the latest non-beta CIQ SDK (2.4.5), the Positioning permission is still greyed out for data fields. I noticed that the 3.0.0 beta does allow you to set Positioning for data fields.

    When will 3.0.0 be released? If not any time soon, do we have to build with the beta? Is this even recommended for production apps?

    Or do we have to edit manifest.xml manually?
  • Agree, there is no way to re-compile apps with 2.4.5 SDK and to have positioning enabled. 4 my data fields affected. 3.0b1 has no ability to create .iq files by design, only release can do.

    Next question what will be with non-updated apps? What if developer has no willing to update such app anymore, no source code?
    What happens if auto-migration enabled? Is it possible to add this permission on Garmin side?
  • For non-updated apps, I've seen that already. At the Summit, beta firmware for the 645m was released (3.11) that has a 3.0.0 VM which enforces this.

    If I download a watchface from the store that uses currentLocation, currentLocation always returns null, so the watchface doesn't have a location for things like sunrise/sunset calculation, accessing weather data, etc. So on my watch faces, I see "no GPS" instead of sunrise/set for example. It acts just like GPS hasn't been used in a while on an older VM where currentLocation can be null. It's not that the watch face crashes, gets deleted, etc. It's just some things don't work. If I build with 3.0.0b1, enable positioning and sideload, everything works again. You'll also see this in the sim with the 3.0.0 beta, so you don't need a 645M.

    No code changes were required in my stuff, just adding the permission.

    I did find that if startLocation is used, it's same there. It's null unless the permission is set. I use that in a couple data fields, and again, with a 3.0.0 sideload (with the permission set) they work fine. Without the permission, I don't get the startLocation (it's always null).

    If an app doesn't use startLocation/currentLocation, I don't think anything needs to change, or if they already have positioning permission (widgets/watch-apps), same there.

    I can't see how auto-migration could come into play here, as that would mean the app store would have to inspect the .prgs and see if startLocation/currentLocation was used, as you don't want the permission in apps that don't need it (it would show as a permission used when the app is installed)
    --
    I think this was a "heads-up" from Brandon, and there'll be a way the permission can be set, and the app can be uploaded to the store before the end of June. Changing manifest.xml won't work, as it will cause an error when you try to build an .iq with the 2.4.5 SDK. (If I set the permission with 3.0.0b1, but then try to build with 2.4.5, I see it, and I have to remove the permission from the manifest.xml.)
  • I think this was a "heads-up" from Brandon, and there'll be a way the permission can be set, and the app can be uploaded to the store before the end of June.


    Yeah I think we all understand that. Maybe you can appreciate how it’s a bit annoying to be told we have to do something, with a firm deadline for doing that thing, and the same person delivering that news neglected to tell us that it isn’t currently possible to do it. I’m sorry but that’s not a great look on Garmin. What if nobody had brought that up? Would they just not say anything until the last minute? Even the original blog post (a long form medium if there ever was one) makes no mention of exactly when this will happen, although I guess it implies you will need a new sdk version.

    As usual the onus is on the devs to point out discrepancies and issues (see: documentation issues, SDK/language quirks, forum issues, Eclipse plugin bugs, store bugs).

    When will the next minor SDK update be released? Tomorrow? Next week? June 29th? So now I guess we’ll sit around refreshing this thread until there’s news /s.

    it would’ve been nice to hear someone explicitly say “You need the next non-beta SDK, which isn’t available yet. We will let you know as soon as it’s ready”. Remember, they are asking us to do something for them. Especially all the amateur/hobbyist devs.

    Thanks for trying the manual change to manifest.xml. Somehow I doubted it would work and it shouldn’t be necessary anyway.
  • Also, I wonder if you could just export your app, extract manifest.xml from the .zip, edit it and put it back. Not that it should be necessary.
  • The permissions get compiled into the .prg in some way. They have to be for sideloads to make use of them.
  • Come on, this is pretty nasty indeed. "You have to fix this before the end of the month, but first you have to wait for us to allow you to fix it".

    Indeed for watchfaces and datafields I can't set the permission and manually editing the xml doesn't work either ("Invalid permission provided"-error). Also, wouldn't it make sense to sticky this topic? Especially if it silently breaks the functionality of existing apps (by simply returning null)...

    A mailing to all connect-iq developers wouldn't be a crazy thing I'd say as I guess not everybody is an avid reader of the forums.

    ConnectIQ is a great addition to/asset for the garmin watches, but it sure isn't always easy to be developer for it...

  • My fault! We’re releasing an SDK today that will include this change. I should have mentioned that the related SDK would be coming soon in my original post. I’ll post back here when it’s available.

    I had meant this as a heads up since the blog post had already been published a few days ago, but I was concerned it hadn’t been seen. Apologies for the confusion.
  • Sorry if I came across a bit too harsh btw, I do sure appreciate your contributions Brandon... It's just that, it can be pretty frustrating at times with connectIQ.

    Wondering though, this location permission thing isn't in effect already by any chance?! I suddenly (since a day or 2) get reports that sunrise/sunset (which uses currentlocation) is not working on my watchface, nor is it on my own (a forerunner 935, 9.10 fw) while I am convinced it worked in the past. I went out for a run 3 hours ago, but sitll no data... It display -- which means nothing is found.

    It works fine in the emulator, but before I start debugging and spending all time on this...
  • 2.4.6 is available (see https://forums.garmin.com/forum/developers/connect-iq/connect-iq-news-announcements/1358066-connect-iq-2-4-6-and-3-0-0-beta-2-sdks-now-available)

    I've set positioning permission in a few things, and downloaded them from the store to a 645m (with 3.11 FW - the 3.x CIQ VM - where this is enforced), and all looks good! As I posted earlier, it was just adding the permission, building a .iq, and updating the store.