I am trying to create an android application with WebRTC using these projects:
AndroidRTC
Which uses this repository: io.prinstine.libjingle
This project is working well when two clients are connected to the net over wifi but it doesnt work when one of the clients is connected via cellular data.
I tried to find the source to see what is going on an I found this static class:
public static class Options {
// Keep in sync with webrtc/base/network.h!
static final int ADAPTER_TYPE_UNKNOWN = 0;
static final int ADAPTER_TYPE_ETHERNET = 1 << 0;
static final int ADAPTER_TYPE_WIFI = 1 << 1;
static final int ADAPTER_TYPE_CELLULAR = 1 << 2;
static final int ADAPTER_TYPE_VPN = 1 << 3;
static final int ADAPTER_TYPE_LOOPBACK = 1 << 4;
public int networkIgnoreMask;
}
And I have found this line of code which refers to a native method that uses this class:
public void setOptions(Options options) {
nativeSetOptions(nativeFactory, options);
}
public native void nativeSetOptions(long nativeFactory, Options options);
The question is how can I enable connection over cellular data? or I would appreciate it if you would help me to find the source of the native methods used in this project to better understand the structure.
from what you have said i think the library your using is connecting over wifi on default, so if you plan on using cellular data then i think you should make a test for that then use the setoptions method found within the library else the library or your app wil keep trying to make a connection over wifi.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With