Integration Practice | Sending Messages by HUAWEI Push Kit in Cocos

  • enerating a signing certificate fingerprint
  • Configuring the signing certificate fingerprint
  • Setting a data storage location
  • Enabling required services
  • Downloading the agconnect-services.json file
var onPushResult = function (code, msg) {console.log("on push result action.");console.log("code: " + code);console.log("msg: " + msg);}var init = function () {let _global = global || window;_global.sdkhub = _global.sdkhub || {};sdkhub.getPushPlugin = () => null;if (typeof SDKHub === 'undefined')return;sdkhub.getPushPlugin = () => SDKHub.AgentManager.getInstance().getPushPlugin();sdkhub.getPushPlugin().startPush();sdkhub.getPushPlugin().setListener(onPushResult, this);}init();

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store