tripflex / WifiWizard2

A Cordova plugin for managing Wifi networks (new version of WiFiWizard) - Latest is version 3+

Home Page:https://www.npmjs.com/package/cordova-plugin-wifiwizard2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ACCESS_FINE_LOCATION forces GPS to switch on, cannot detect SSID with GPS swiched off

eugenioghio opened this issue · comments

Prerequisites

Check all boxes if you have done the following:

Issue type

Select all that apply

  • Bug
  • Enhancement
  • Task
  • Question
  • Other

Description

In order to have wifiwizard to detect the SSID, the GPS must be switched on.
When my app is initialized I proceed to check or request for ACCESS_FINE_LOCATION permission.
On the user side, the user is promted to grant the app access to device location but ultimately if the GPS is switched off I got SSID unknown.
What the heck have GPS to do with WiFi SSID?

Steps to Reproduce

  1. Do everything necessary to have the plugin work
  2. Swicht off the GPS
  3. have WifiWizard2.getConnectedSSID() to run

Expected behavior: I expect to get the SSID

Actual behavior: I get SSID unknown

Reproduces how often: !00% of times

Versions

WifiWizard2 3.1.0
Ionic CLI 5.2.8
Android 9
IOS 13.1.1

Additional Information

I have a button to scan for SSID if I switch on GPS and rescan I get the SSID.
Said that I want to get rid of: the necessity of having the GPS draining ones battery, and having any problem with GPS to fall on my app.

If this behavior is what it is suppose to happen, then I will turn this issue in a suggestion as long as it is permitted.