forceWifiUsage not working
Opened this issue · 4 comments
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 ?
I am also getting the same issue
@Pankajmalhan, please try #85
@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.
same on Android 10