When setting a Realm URL it looks like it defaults to port 80 instead of 9080. This will cause it to throw a connection error if trying to connect to a default configured server.
// Will default to port 80, should default to 9080
SyncConfiguration config = new SyncConfiguration.Builder(user, "realm://ros.realm.io/~/default");
Also verify that realms default to the correct port (9443)
The default port has been set in the sync. So it would be sufficient for user just provide a URL without port like realm:://abc.io/test. IMO, we should just remove SyncConfiguration.PORT_REALM and SyncConfiguration.PORT_REALMS
Most helpful comment
The default port has been set in the sync. So it would be sufficient for user just provide a URL without port like
realm:://abc.io/test. IMO, we should just removeSyncConfiguration.PORT_REALMandSyncConfiguration.PORT_REALMS