After adding compile 'org.webrtc:google-webrtc:1.0.+'
to my build.gradle file I try to init PeerConnectionFactory
, but this class has no any useful methods.
What am I doing wrong?
UPDATE:
After adding compile 'org.webrtc:google-webrtc:1.0.+'
to my build.gradle file I try to init PeerConnectionFactory
, but this class has no any useful methods.
What am I doing wrong?
UPDATE:
The last version org.webrtc:google-webrtc:1.0.21217
You can init by following codes
PeerConnectionFactory.InitializationOptions.Builder optionBuilder =
PeerConnectionFactory.InitializationOptions.builder(/* Put context here */);
optionBuilder.setEnableInternalTracer(true);
optionBuilder.setFieldTrials("WebRTC-FlexFEC-03/Enabled/");
optionBuilder.setEnableVideoHwAcceleration(true);
PeerConnectionFactory.initialize(optionBuilder.createInitializationOptions());
First, try to use an specific version like: compile 'org.webrtc:google-webrtc:1.0.20198'
And then make sure you rebuild your project (not only refresh gradle, since it might not be enough for the autocomplete to work).
In your screenshot, it looks like you are trying to autocomplete outside of any method. Since Android Studio tries to only show you valid stuff, it won't display the other methods unless you write it on a valid context (i.e.: inside of some method's implementation).