This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void HelloWorld::genAccountMenu() { | |
mMenu->addChild(MenuItemLabel::create(Label::createWithSystemFont("Login", "arial", 24), [](Ref*){ | |
showMsg("to login..."); | |
// sdkbox::PluginHMS::login(0); // slient login | |
sdkbox::PluginHMS::login(1); // login (id token) | |
// sdkbox::PluginHMS::login(2); // login (author code) | |
})); | |
mMenu->addChild(MenuItemLabel::create(Label::createWithSystemFont("Logout", "arial", 24), [](Ref*){ | |
showMsg("to logout..."); | |
sdkbox::PluginHMS::logout(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "HelloWorldScene.h" | |
#include "SimpleAudioEngine.h" | |
#include "PluginHMS/PluginHMS.h" | |
#include "json/rapidjson.h" | |
#include "json/document.h" | |
..... | |
//Listener for HMS | |
class PluginHMSListener : public sdkbox::HMSListener { | |
public: | |
PluginHMSListener(HelloWorld* scene): hw(scene) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using HuaweiMobileServices.Id; | |
using HuaweiMobileServices.Utils; | |
using UnityEngine; | |
using UnityEngine.UI; | |
using HmsPlugin; | |
public class AccountSignIn : MonoBehaviour | |
{ | |
private const string NOT_LOGGED_IN = "No user logged in"; | |
private const string LOGGED_IN = "{0} is logged in"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ObtainProductConsumablesInfo(IList<string> productIdConsumablesList) | |
{ | |
if (iapAvailable != true) | |
{ | |
OnObtainProductInfoFailure?.Invoke(IAP_NOT_AVAILABLE); | |
return; | |
} | |
ProductInfoReq productInfoReq = new ProductInfoReq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# define DEBUG | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using HuaweiConstants; | |
using HuaweiMobileServices.Base; | |
using HuaweiMobileServices.IAP; | |
using System; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using HuaweiMobileServices.Base; | |
using HuaweiMobileServices.Id; | |
using HuaweiMobileServices.Push; | |
using HuaweiMobileServices.Utils; | |
using System; | |
using UnityEngine; | |
using UnityEngine.UI; | |
namespace HmsPlugin | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# define DEBUG | |
using HuaweiMobileServices.Base; | |
using HuaweiMobileServices.IAP; | |
using HuaweiMobileServices.Utils; | |
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace HmsPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using HuaweiMobileServices.Analystics; | |
using HuaweiMobileServices.Utils; | |
using UnityEngine.UI; | |
using System.Net.Mail; | |
namespace HmsPlugin | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using HuaweiMobileServices.Analystics; | |
using HuaweiMobileServices.Utils; | |
using System; | |
public class AnalyticsManager : MonoBehaviour | |
{ | |
public static AnalyticsManager GetInstance(string name = "AnalyticsManager") => GameObject.Find(name).GetComponent<AnalyticsManager>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using HuaweiMobileServices.Crash; | |
using UnityEngine; | |
public class CrashManager : MonoBehaviour | |
{ | |
IAGConnectCrash agConnectCrash; | |
void Start() | |
{ | |
Debug.Log("[HMS]: Crash Initialized"); | |
agConnectCrash = AGConnectCrash.GetInstance(); |
OlderNewer