App.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /**
  3. * App.php UTF-8
  4. * APP事件处理
  5. *
  6. * @date : 2018/5/30 16:43
  7. *
  8. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  9. * @author : wuyonghong <wyh@huosdk.com>
  10. * @version : HUOSDK 8.0
  11. */
  12. namespace huo\controller\data;
  13. use huolib\queue\request\Channel;
  14. use huolib\queue\request\Common;
  15. use huolib\queue\request\Crash;
  16. use huolib\queue\request\Device;
  17. use huolib\queue\request\Game;
  18. class App {
  19. /**
  20. * app激活
  21. * 记录客户端被激活日志,用户下载APP后第一次打开客户端时调用。
  22. * http://doc.1tsdk.com/138?page_id=3375
  23. *
  24. * @param Common $com_rq
  25. * @param Device $device_rq
  26. * @param Game $game_rq
  27. * @param Channel $agent_rq
  28. *
  29. * @return bool
  30. */
  31. public function activation(Common $com_rq, Device $device_rq, Game $game_rq, Channel $agent_rq) {
  32. return true;
  33. }
  34. /**
  35. * app启动
  36. * 记录客户端被启动日志,用户激活客户端后,每次跳转到SDK登录界面时调用。
  37. *
  38. * http://doc.1tsdk.com/138?page_id=3376
  39. * @param Common $com_rq
  40. * @param Device $device_rq
  41. * @param Game $game_rq
  42. * @param Channel $agent_rq
  43. *
  44. * @return bool
  45. */
  46. public function startup(Common $com_rq, Device $device_rq, Game $game_rq, Channel $agent_rq) {
  47. return true;
  48. }
  49. /**
  50. * app崩溃
  51. * 记录客户端异常的日志,用户激活无法跳转到SDK登录界面、闪退等异常情况时调用。
  52. * http://doc.1tsdk.com/138?page_id=3377
  53. *
  54. * @param Common $com_rq
  55. * @param Device $device_rq
  56. * @param Game $game_rq
  57. * @param Channel $agent_rq
  58. * @param Crash $crash_rq
  59. *
  60. * @return bool
  61. */
  62. public function crash(Common $com_rq, Device $device_rq, Game $game_rq, Channel $agent_rq, Crash $crash_rq) {
  63. return true;
  64. }
  65. /**
  66. * app心跳
  67. * 客户端每2分钟上报一次客户端活跃状态的事件
  68. * http://doc.1tsdk.com/138?page_id=3378
  69. *
  70. * @param Common $com_rq
  71. * @param Device $device_rq
  72. * @param Game $game_rq
  73. * @param Channel $agent_rq
  74. *
  75. * @return bool
  76. */
  77. public function heartbeat(Common $com_rq, Device $device_rq, Game $game_rq, Channel $agent_rq) {
  78. return true;
  79. }
  80. }