pjsip-android
pjsip-android copied to clipboard
Resolving stun servers on main thread creates ANR from Android 11 and above.
Firstly i am resolving this stun server "stun2.l.google.com:19302" which has high priority.
StringVector servers = new StringVector(); if (stunservers == null || stunservers.size() < 1) { servers.add("stun2.l.google.com:19302"); } else { for (String s : stunservers) { servers.add(s); } }
mEndpoint.natUpdateStunServers(servers, true);
I'm still trying to figure out how to move everything on a background thread while avoiding the past crashes