最近接手了半年沒有更新的Android App,本地測試時沒有問題,但Google Play 商店審批時被拒,HostnameVerifier 不安全!
於是看看HostnameVerifier是不是出了什麼問題...
最近接手了半年沒有更新的Android App,本地測試時沒有問題,但Google Play 商店審批時被拒,HostnameVerifier 不安全!
window.location = "/Tentative/TentativeTime" // localhost:8080/Tentative/TentativeTime , BUT OK IN VIUSAL STUDIO
top.location = "/HomePage/Tentative/TentativeTime"; //OK
top.location = "/Tentative/TentativeTime"; //localhost:8080/Tentative/TentativeTime

public class UserManagementService : UserManagementServiceBase
{
[Inject("LocalUser")] public UserViewModel LocalUser;
public override void Setup()
{
base.Setup();
// for develop only
LocalUser.AuthorizationState = AuthorizationState.Authorized;
//LocalUser.AuthorizationState = AuthorizationState.Unauthorized;
}
public void AuthorizeLocalUser(string Username, string Password)
{
if (Username == "uframe" && Password == "uframe")
{
Debug.Log("authorized in service");
LocalUser.AuthorizationState = AuthorizationState.Authorized;
}
}
}
Application.LoadLevel("SceneName")
Application.LoadLevelAsync ("SceneName");
_touches = Input.touches;
if(_touches.Length == 1)
{
if(_touches[0].phase == TouchPhase.Stationary)
{
Debug.Log("Clicked, 紅點出現");
_clicking = true;
}
else
{
Debug.Log("Moving, 沒有紅點");
_clicking = false;
}
}
#if UNITY_4_6 || UNITY_5_0 || UNITY_5_1
#if UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3
public FlatHexPoint DirectionPoint(FlatHexPoint targetPoint, FlatHexPoint currentPoint)
{
//NorthEast, North, NorthWest, SouthWest, South, SouthEast
FlatHexPoint point = currentPoint - targetPoint;
//N, NE, E, S
if(point.X >= 0)
{
if(point.Y > 0)
return FlatHexPoint.North;
else if (point.Y == 0)
return FlatHexPoint.NorthEast;
else
{
if(point.X == 0)
return FlatHexPoint.South;
else
return FlatHexPoint.SouthEast;
}
}
//NW, SW
else if(point.X < 0)
{
if(point.Y > 0)
return FlatHexPoint.NorthWest;
else
return FlatHexPoint.SouthWest;
}
}