1

The documentation says areaAccessPoints of a wifi trigger can be set as {SSID: "*"} that matches any SSID given in the Wifi policy, but no other SSIDs.

I have a requirement to get the app notified through a wifi trigger whenever user enters a wifi zone that starts with a standard string say 'FreeWifi'.

I have tried using 'FreeWifi*' string as areaAccesspoints SSID - {SSID: "FreeWifi*"}. With this, I assumed the trigger should basically be invoked whenever user enters into any FreeWifi hotspot like FreeWifi1, FreeWifi2, FreeWifi3, etc.

I have checked this but not working as expected. Is this possible to achieve with worklight location wifi APIs?

Worklight Version used - 6.2/6.3

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
chikbampen
  • 15
  • 3

1 Answers1

1

The wildcard specification '*' allows you to match any SSID or MAC address. Unfortunately, it looks like '*' as a suffix isn't supported. It's not ideal but you can work around this limitation by setting up both your acquisition filter and area triggers to be on {SSID: '*'} and in your trigger callback to then check that access-point prefix for the 'FreeWifi' part for some access point in the context. Alternatively, if you know the number of networks you could set it explicitly up for FreeWifi1, FreeWifi2, ..., FreeWifiN (where you can build up the objects programatically).

MotiNK
  • 421
  • 2
  • 12