/// <summary> /// iOS,Androidそれぞれの端末登録を行う /// </summary> /// <param name="usePush">true:プッシュ通知有効 false:プッシュ通知無効</param> /// <param name="useAnalytics">true:開封通知有効 false:開封通知無効</param> /// <param name="androidSenderId">Android SenderId</param> /// <param name="getLocation">true:位置情報有効 false:位置情報無効</param> private static void RegisterPush(bool usePush, bool useAnalytics, String androidSenderId, bool getLocation = false) { //Push関連設定 _usePush = usePush; _useAnalytics = useAnalytics; _androidSenderId = androidSenderId; // Register if (usePush) { //Installation基本情報を取得 NCMBManager.CreateInstallationProperty(); if (!getLocation) { #if UNITY_ANDROID NCMBPush.Register(androidSenderId); #elif UNITY_IOS NCMBPush.Register(useAnalytics); #endif } else { #if UNITY_ANDROID //not Analytics NCMBPush.RegisterWithLocation(androidSenderId); #elif UNITY_IOS NCMBPush.RegisterWithLocation(); #endif } } }
/// <summary> /// Registers the push. /// </summary> /// <param name="usePush">If set to <c>true</c> use push.</param> /// <param name="androidSenderId">Android sender identifier.</param> /// <param name="getLocation">If set to <c>true</c> get location.</param> private static void RegisterPush(bool usePush, String androidSenderId, bool getLocation = false) { // Sender idを設定 _androidSenderId = androidSenderId; // Register if (usePush) { if (!getLocation) { #if UNITY_ANDROID NCMBPush.Register(androidSenderId); #elif UNITY_IOS NCMBPush.Register(); #endif } else { #if UNITY_ANDROID NCMBPush.RegisterWithLocation(androidSenderId); #elif UNITY_IOS NCMBPush.RegisterWithLocation(); #endif } } }