to adjust socket server require ip
This commit is contained in:
@@ -11,6 +11,7 @@ import com.elegant.network.RequestOptions;
|
|||||||
import com.elegant.network.utils.GsonUtil;
|
import com.elegant.network.utils.GsonUtil;
|
||||||
import com.elegant.network.utils.NetworkSdkUtils;
|
import com.elegant.network.utils.NetworkSdkUtils;
|
||||||
import com.elegant.utils.CommonUtils;
|
import com.elegant.utils.CommonUtils;
|
||||||
|
import com.mogo.cloud.httpdns.bean.HttpDnsSimpleLocation;
|
||||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||||
import com.mogo.cloud.socket.third.core.SocketConfig;
|
import com.mogo.cloud.socket.third.core.SocketConfig;
|
||||||
import com.mogo.cloud.socket.third.core.network.model.MessageCallbackData;
|
import com.mogo.cloud.socket.third.core.network.model.MessageCallbackData;
|
||||||
@@ -70,9 +71,17 @@ public class RequestManager {
|
|||||||
|
|
||||||
sRequestingAddress = true;
|
sRequestingAddress = true;
|
||||||
|
|
||||||
|
double lat = 0;
|
||||||
|
double lon = 0;
|
||||||
|
HttpDnsSimpleLocation httpDnsSimpleLocation = MoGoAiCloudClientConfig.getInstance().getIHttpDnsCurrentLocation().getCurrentLocation();
|
||||||
|
if (httpDnsSimpleLocation != null) {
|
||||||
|
lat = httpDnsSimpleLocation.getLat();
|
||||||
|
lon = httpDnsSimpleLocation.getLon();
|
||||||
|
}
|
||||||
final Map<String, Object> params = ParamsBuilder.of(false)
|
final Map<String, Object> params = ParamsBuilder.of(false)
|
||||||
.append("lat", 0)//required by server
|
|
||||||
.append("lon", 0)//required by server
|
.append("lat", lat)//required by server
|
||||||
|
.append("lon", lon)//required by server
|
||||||
.append("sn", SocketConfig.instance().getSn())
|
.append("sn", SocketConfig.instance().getSn())
|
||||||
.append("versionCode", CommonUtils.getVersionCode(SocketConfig.instance().getAppContext()))
|
.append("versionCode", CommonUtils.getVersionCode(SocketConfig.instance().getAppContext()))
|
||||||
.append("versionName", CommonUtils.getVersionName(SocketConfig.instance().getAppContext()))
|
.append("versionName", CommonUtils.getVersionName(SocketConfig.instance().getAppContext()))
|
||||||
|
|||||||
Reference in New Issue
Block a user