Compare commits
3 Commits
7fe8ed85ec
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c0509da0fc | |||
| c9fe482c8c | |||
| 92d04aba61 |
@@ -44,8 +44,6 @@ import org.json.JSONObject;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import kotlinx.serialization.json.Json;
|
||||
|
||||
public class SDKManager {
|
||||
|
||||
private final static Handler handler = new Handler(Looper.getMainLooper());
|
||||
@@ -124,6 +122,7 @@ public class SDKManager {
|
||||
|
||||
public static void UnityResetServerUrl(String url) {
|
||||
SDKLog.i("UnityResetServerUrl : " + url);
|
||||
SetDNSIPsEnable(false);
|
||||
SDKAPI.getIns().updateServer(url);
|
||||
}
|
||||
|
||||
@@ -561,6 +560,18 @@ public class SDKManager {
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetDNSIPsEnable(boolean enable) {
|
||||
SDKAPI.enableDoh(enable);
|
||||
if(enable) {
|
||||
SDKAPI.setHttpDnsIps(new String[]{
|
||||
"34.111.1.231",
|
||||
"2600:1901:0:c31b::"
|
||||
});
|
||||
}
|
||||
else{
|
||||
SDKAPI.setHttpDnsIps(new String[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ public class TYApp extends Application {
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
SDKAPI.getIns().onApplicationCreate(this);
|
||||
SDKManager.SetDNSIPsEnable(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -19,4 +20,5 @@ public class TYApp extends Application {
|
||||
super.attachBaseContext(base);
|
||||
SDKAPI.getIns().onAttachBaseContext(base, this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -364,6 +364,13 @@ namespace tysdk
|
||||
UnityBridgeFunc.CleanLinkTmpSnsInfo();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public async Task<ChangeLinkResult> ChangeLinkAccount(EAccoutType accoutType, int oldUserId, int newUserId)
|
||||
{
|
||||
await Task.Delay(300);
|
||||
return new ChangeLinkResult(){code = 1};
|
||||
}
|
||||
#elif UNITY_IOS || UNITY_ANDROID
|
||||
public async Task<ChangeLinkResult> ChangeLinkAccount(EAccoutType accoutType, int oldUserId, int newUserId)
|
||||
{
|
||||
var task = TYSDKCallbackManager.Instance.RegisterCallback<ChangeLinkResult>(TimeSpan.FromSeconds(30));
|
||||
@@ -388,6 +395,7 @@ namespace tysdk
|
||||
CleanLinkTempSnSInfo();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
public void ChangeLinkAccountResult(string message)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user