Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forceWifiUsage not working #82

Open
Pankajmalhan opened this issue May 29, 2019 · 4 comments
Open

forceWifiUsage not working #82

Pankajmalhan opened this issue May 29, 2019 · 4 comments

Comments

@Pankajmalhan
Copy link

Pankajmalhan commented May 29, 2019

I am working on a project in which we connect to a Raspberry PI device. This PI device makes a hotspot and we make a connection to PI using WIFI. If Mobile data is off then all APIs request are sent to WIFI but if mobile data is on then APIs request doesn't redirect to wifi instead request are send to Mobile data.
I try forceWifiUsage method but that is not also working.
wifi.forceWifiUsage(true); wifi.findAndConnect(FlyDetect-${this.props.navigation.state.params.deviceSerial.substr(11)}, API.pIDevicePassword, (found) => { if (found) { this.checkConnection(); } else { alert(strings("errorMessages.CT1008", this.lang)) } });

wifi.connectionStatusOfBoundNetwork((isBound) => {
if (isBound) {
this.getConfig();
} else {
alert('no');
this.checkConnection();
}
});

after implementing this all request are going to mobile data, instead of wifi.
What am I doing wrong ?

@jothikannan
Copy link

I am also getting the same issue

@jothikannan
Copy link

@Pankajmalhan, please try #85

@pjunior94
Copy link

@jothikannan even trying what you did in #85. I also getting the same issue. On debug it works perfectly, not the same after release the app.

@verybluebot
Copy link

same on Android 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants