my application creates wi-fi connection sensor means user have no connection internet long connected peripheral.
i've read not possible have 2 wifi connection without rooting device.
i guess i've read posts on stack overflow concerning topic of them quite old.
it ok if use @ least mobile network internet user able use browser or other applications while connected.
i tried set preferred network not working.
try { connectivitymanager connectivitymanager = (connectivitymanager) context.getsystemservice(context.connectivity_service); if (forcemobile) { connectivitymanager.setnetworkpreference(connectivitymanager.type_mobile); } else { connectivitymanager.setnetworkpreference(connectivitymanager.default_network_preference); } } catch (exception exc) { }
if connected sensor on wifi . still wont able connect internet through mobile data @ time 1 of 2 interfaces can connected in of devices(there might exceptions). best way achieve if connect sensor using bluetooth , stay connected internet on wifi or mobile data .since bluetooth , mobile data or wifi can stay connected in parallel.
Comments
Post a Comment