SDK 3.1.7 is now out

Time to prepare for the new devices and see what bugs were fixed and what new ones we can find.  Grin

  • That would be bad as [0, 0] technically is a valid location, thus there is no way to determine if the reading is true or not.

  • I'm not seeing this, at least in a watch face.  I still get null if there's no GPS. ("info" isn't null, currentLocation is)

    		var info=Activity.getActivityInfo();
    		if (info != null && info.currentLocation!=null) {
    			var degs=info.currentLocation.toDegrees();
    			Sys.println("degs="+degs);
    		} else {
    			Sys.println("null loc");
    		}	

    What kind of an app are you seeing this in?

  • Wow sounds great, 

    Does Garmin fix the problem with compatibility on the store ? I cant access right now to the log may be it is in it. 

  • These are the full release notes (no mention of the store - although I have noticed that in the run config options now I can't select to run on Fenix 6 as 3.0.x only 3.1.x, and I think before I could select both?)

    v3.1.7

    General Changes

    • Reduce memory consumption of member variables initialized to primitive types.
    • Update ERA viewer to only fetch crash logs for the most recent app version.
    • Fix issue that prevented the Connect IQ Plugin from working with SDK versions prior to 3.1.0.
    • Add WatchUi.cancelAllAnimations() to cancel animations started with WatchUi.animate().
    • Fix incorrect Lang.StorageFullException being thrown for Media apps.
    • Fix Media.CacheStatistics.capacity reporting the incorrect size.
    • Update BLE makeWebRequest to always provide response bodies no matter the http status code.
    • Fix an issue that caused position information to drift over time.
    • Increase watch face memory limit to 512K for vívoactive® 4 / 4s.
    • Add support for the Approach® S62.
    • Add support for the tactix® Delta Sapphire.

    Simulator Changes

    • Move Glance View option from the Simulation to the Settings menu, and treat it like a device setting.
    • Update Glance View to re-launch the app as a widget when the glance for the active app is selected.
    • Enable isGlanceModeEnabled flag support.
    • Fix invoking onLayout() for each visible data field.
    • Fix watchface memory on vivoactive® 4 / First Avenger / Darth VaderTm to match the actual device.
    • Update power mode handling to not initially enter low power mode when starting a watch face. It is now up to the developer to explicitly toggle the power mode via the menu.

    Compiler Changes

    • Fix bug that caused duplicate init method fields to be added to class definitions.
    • Fix a bug in the MonkeyMotion entry point, which caused a Null Pointer Exception to be thrown if an output file was not provided and the video file was just a filename (i.e., the file had no absolute / relative parent path associated with it).
    • Fix MonkeyMotion bug, which could potentially throw a divide by zero exception when processing a GIFs encoded delay rate.
  • What kind of an app are you seeing this in?

    In a WatchFace. My code is pretty much the same as yours. I can't reproduce this on sim as for some reason sim displayed that it runs on 3.1.6 despite I have updated everything on 3.1.7.
    But since 3.1.7 was released, I started to get 0.0 in logs on f6 and v4 devices. I assume that this happening when the application just installed on the device and trying to get access to uninitialized GPS.

  • I'm not seeing this with a watchface in either the 3.1.7 sim or on a va4 with the latest firmware.  I added this to onUpdate()

    		var info=Activity.getActivityInfo();
    		var degs=null;
    		if (info != null && info.currentLocation!=null) {
    			degs=info.currentLocation.toDegrees();
    		}
    		dc.drawText(width/2,150,Gfx.FONT_XTINY,""+degs,Gfx.TEXT_JUSTIFY_CENTER);

    So I can see what's going on from the watch face.  Without a location, I see null, with a location, I see lat/lon.

    Post your code, as maybe it's something about how you're saving a location in Storage.  Like maybe saving [0.0] if you don't have a location yet, and the next time, it reads that from Storage.

  • That would surprise me as this code worked for years with no change and I started to get [0,0] on 3.1.7 only

    var activityLocation = Activity.getActivityInfo().currentLocation;
    		if (activityLocation != null)
        	{
       			      Setting.SetLastKnownLocation(activityLocation.toDegrees());
        	}

  • And only on the devices, correct? You haven't seen it in the 3.1.7 sim, right?

  • Correct. I can't get this on sim (looks like my environment is still 3.1.6 but that's another issue).

    Probably, it happens when GPS starts initializing and returns 0.0 while the real data are still unavailable...

  • In a watch face, GPS is never turned on, so there's no "starts initializing" - you are getting the info from the last activity.

    The thing is what you're seeing likely has nothing to do with the SDK, as it sounds like you're still on 3.1.6, but the watch might have a 3.1.7 VM.