1

関数

loadWifiTracking() {

      var policy = {

            Wifi: {
                interval: 3000,
                signalStrengthThreshold: 15,
                accessPointFilters: [{SSID:"wifiName"}]
            }
      };

      var triggers = {

        Wifi: {

            DwellInSide: {
                type: "DwellInside",
                areaAccessPoints: [{SSID: 'wifiName'}],
                callback:function() {alert("Thank You For Being Here!");},
                dwellingTime: 5000
            },

            Connected: {
                type: 'Connect',
                connectedAccessPoint:[{SSID: 'wifiName'}],
                callback: function() {alert("Reached Here");}
            },

        }

      };


     WL.Device.startAcquisition(policy, triggers, acquisitionFailure);

         var acquisitionFailure = {

             Wifi : wifiFailure,

     };

     function wifiFailure(positionError) {

        alert("pe" + positionError);

     }

}

エラーがスローされます:

The WIFI Connect trigger with network specification: [{"SSID":"wifiName"}] will have no affect, since this network do not appear in WIFI acquisition policy.

正確な問題は何ですか? 助けてください。

4

1 に答える 1

2
Connected: {
                type: 'Connect',
                connectedAccessPoint:[{SSID: 'wifiName'}],
                callback: function() {alert("Reached Here");}
            },

Connectトリガーの場合でわかるように、プロパティconnectedAccessPointは特異です。したがって、SSID の配列を渡すのではなく、単一の SSID を渡す必要があります。

試す:

Connected: {
                    type: 'Connect',
                    connectedAccessPoint:{SSID: 'wifiName'},
                    callback: function() {alert("Reached Here");}
                },
于 2014-02-26T09:57:46.420 に答える