-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
support forcing transport type #2004
Comments
You can do that with the https://pub.dev/packages/native_dio_adapter for iOS but I am not sure about the Android side which uses https://pub.dev/packages/cronet_http But plain dio on Dart side does not support this. |
As said in the comment above, dio itself can't and won't support this usecase. It is possible with the native adapter, or you can manually check what connection is currently active and make requests accordingly. |
Hi @kuhnroyal , thanks for your information. I can't find any configuration that supports my issue above. At this time, I think the only solution on native side, using platform-specific channel here is my reference on Android developer web. |
Yea, you can actually only disallow cellular access with |
Request Statement
in native android we can forcing http connection over cellular data / wifi using okhttp3
this example snippet code
.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR)
my question, is it dio have configuration to force connection over cellular/wifi?
Solution Brainstorm
No response
Tasks
The text was updated successfully, but these errors were encountered: