|  |  | 
 |  |  | import com.allugame.freesdk.entities.FreeOrder; | 
 |  |  | import com.allugame.freesdk.port.FreePlatform; | 
 |  |  | import com.reyun.tracking.sdk.Tracking; | 
 |  |  | import com.ss.android.common.applog.TeaAgent; | 
 |  |  | import com.ss.android.common.lib.EventUtils; | 
 |  |  |  | 
 |  |  | import org.json.JSONException; | 
 |  |  | import org.json.JSONObject; | 
 |  |  | 
 |  |  | /** | 
 |  |  |  * Created by Administrator on 2018/7/18 0018. | 
 |  |  |  */ | 
 |  |  |  | 
 |  |  | public class FreePlatformUtil | 
 |  |  | { | 
 |  |  |     private static FreePlatformUtil s_Instance; | 
 |  |  |  | 
 |  |  |     private boolean m_Init = false; | 
 |  |  |  | 
 |  |  |     public static FreePlatformUtil getInstace() | 
 |  |  |     public static FreePlatformUtil getInstance() | 
 |  |  |     { | 
 |  |  |         if (s_Instance == null) | 
 |  |  |         { | 
 |  |  | 
 |  |  |                     case FreeCallbackCode.LOGOUT_SUCCESS: | 
 |  |  |                         m_Message.put("code", CodeA2U.FreePlatformLogoutOk); | 
 |  |  |                         UniversalUtil.sendMessageToUnity(m_Message); | 
 |  |  |                         EventUtils.setLogin("mobile",true); | 
 |  |  |                         break; | 
 |  |  |                     case FreeCallbackCode.LOGOUT_FAILURE: | 
 |  |  |                         m_Message.put("code", CodeA2U.FreePlatformLogoutFail); | 
 |  |  | 
 |  |  |             @Override | 
 |  |  |             public void onResult(boolean b, String account) | 
 |  |  |             { | 
 |  |  |                 m_Account = account; | 
 |  |  |                 Map<String, Object> _registerMsg = new HashMap<>(); | 
 |  |  |                 _registerMsg.put("code", CodeA2U.FreePlatformRegisterOk); | 
 |  |  |                 _registerMsg.put("account", account); | 
 |  |  |                 _registerMsg.put("account", m_Account); | 
 |  |  |                 UniversalUtil.sendMessageToUnity(_registerMsg); | 
 |  |  |                 Tracking.setRegisterWithAccountID(account); | 
 |  |  |                 EventUtils.setRegister("mobile",true); | 
 |  |  |                 Tracking.setRegisterWithAccountID(m_Account); | 
 |  |  |             } | 
 |  |  |         }); | 
 |  |  |     } | 
 |  |  |     private String m_Account; | 
 |  |  |     public void SendRegisterEvent() | 
 |  |  |     { | 
 |  |  |         Tracking.setRegisterWithAccountID(m_Account); | 
 |  |  |     } | 
 |  |  | } |