I am making a little application that uses the Communications module, specifically the checkWifiConnection method. I followed the implementation as stated in the API docs. However, I am getting an Invalid value error.
The error I am getting is
Error: Invalid Value Details: Failed invoking <symbol> in line 22
Note: the code is unfinished so don't worry about the rest.
using Toybox.Communications as Comm; using Toybox.System as Sys; using Toybox.Position as Position; class GeofenceHelper { function initialize() { checkWifiConnection(); } private function getStatus(){ } private function getError(){ } // Wi-Fi connection checking private function checkWifiConnection() { Comm.checkWifiConnection(method(:onWifiConnectionChecked)); } // Callback method for checkWifiConnection private function onWifiConnectionChecked(result) { var wifiStatus = result[:wifiAvailable]; var errorCode = result[:errorCode]; } }