update:更新tysdk 默认修改
This commit is contained in:
@@ -126,12 +126,26 @@ public class SDKManager {
|
||||
TYUnityActivity.setSdkInited();
|
||||
SDKAPI.getIns().onActivityStart(activity);
|
||||
SDKAPI.getIns().onActivityResume(activity);
|
||||
notifyInitResult(true, "ok");
|
||||
} catch (Exception e) {
|
||||
System.out.println("initSDK Exception " + e);
|
||||
notifyInitResult(false, e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static void notifyInitResult(boolean success, String msg) {
|
||||
try {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("code", success ? 0 : 1);
|
||||
result.put("msg", msg);
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME,
|
||||
ConfigManager.INIT_CALLBACK_FUNCTION_NAME, result.toString());
|
||||
} catch (JSONException e) {
|
||||
Log.e(TAG, "notifyInitResult error: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Login / Callbacks (shared)
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user