PedalPi / Apk

App controller for smart devices and navigators
http://PedalPi.github.io/Apk
0 stars 1 forks source link

Informs if network has disabled #37

Closed SrMouraSilva closed 7 years ago

SrMouraSilva commented 7 years ago

Using ionic Network native

As I mentioend above, iOs is limited and won’t allow you to use the WiFi feature in the iPhone as you want.

You’re limited to only “listing the networks and current connected network”, any other action is not allowed (there are undocumented APIs in iOs that allow you to use the WiFi in a more flexible way, but if you do use them, your app won’t be accepted in appstore).

So, what to do if your app needs WiFi feature so badly? Well, to be honest there is nothing muhc you can do other that modify your app workflow.

for the case of the app I was working on, what we did is to list the networks available (allowed), and then fetc the current connected WiFi (allowed), if the current WiFi is the same as the one we expect (the IoT WiFi name) than we proceed, of not we ask the user to manually switch to a specific WiFi from the list.

In Android, we kept the workflow the same as iOs, even though we had the chance to automate it, but for the sake to simplify maintenance, we did it that way.