private void Awake() { UpdateStatus("Status: Not Ready"); //listen for event LocalNotificationPlugin.OnLocalNotificationLoadComplete += OnLocalNotificationLoadComplete; LocalNotificationPlugin.OnLocalNotificationLoadFail += OnLocalNotificationLoadFail; localNotificationPlugin = LocalNotificationPlugin.GetInstance(); localNotificationPlugin.SetDebug(0); localNotificationPlugin.Init(); timePlugin = TimePlugin.GetInstance(); timePlugin.SetDebug(0); int isOpenUsingNotification = localNotificationPlugin.IsOpenUsingNotification(); Debug.Log("[ShareAndExperienceDemo]: isOpenUsingNotification " + isOpenUsingNotification); if (isOpenUsingNotification == 1) { //do something here } else { //do something here } }
private void AddLocalNotification(DateTime time, string title, string text) { if (time >= DateTime.Now) { int item = ++this._notificationId; this._notificationIdList.Add(item); LocalNotificationPlugin.SendNotification(item, (TimeSpan)(time - DateTime.Now), title, text); } }
private void CleanNotification() { LocalNotificationPlugin.ClearNotifications(); foreach (int num in this._notificationIdList) { LocalNotificationPlugin.CancelNotification(num); } this._notificationIdList.Clear(); }
// Use this for initialization void Start() { int tag; string mes; tag = (int)LocalNotificationConfig.LocalNotificationType.StaminaUp; mes = LocalNotificationConfig.GetLocalNotificationMessage(tag); LocalNotificationPlugin.reserveLocalPush(mes, 10, tag); Debug.Log("(^-^)"); }
public static LocalNotificationPlugin GetInstance() { if(instance==null){ container = new GameObject(); container.name="LocalNotificationPlugin"; instance = container.AddComponent( typeof(LocalNotificationPlugin) ) as LocalNotificationPlugin; DontDestroyOnLoad(instance.gameObject); aupHolder = AUPHolder.GetInstance(); instance.gameObject.transform.SetParent(aupHolder.gameObject.transform); } return instance; }
public static LocalNotificationPlugin GetInstance() { if (instance == null) { container = new GameObject(); container.name = "LocalNotificationPlugin"; instance = container.AddComponent(typeof(LocalNotificationPlugin)) as LocalNotificationPlugin; DontDestroyOnLoad(instance.gameObject); aupHolder = AUPHolder.GetInstance(); instance.gameObject.transform.SetParent(aupHolder.gameObject.transform); } return(instance); }
// Use this for initialization void Start() { localNotificationPlugin = LocalNotificationPlugin.GetInstance(); localNotificationPlugin.SetDebug(0); int isOpenUsingNotification = localNotificationPlugin.IsOpenUsingNotification(); Debug.Log("[ShareAndExperienceDemo]: isOpenUsingNotification " + isOpenUsingNotification); if (isOpenUsingNotification == 1) { //do something here } else { //do something here } }
public void CancelNotification() { LocalNotificationPlugin.Remove(id); }
public void SetLocalNotification() { id++; LocalNotificationPlugin.Add(id, "通知タイトル " + id, "通知本文", 15); }
// Use this for initialization void Start() { id = 0; LocalNotificationPlugin.Init(); }
// Use this for initialization void Start() { localNotificationPlugin = LocalNotificationPlugin.GetInstance(); localNotificationPlugin.SetDebug(0); int isOpenUsingNotification = localNotificationPlugin.IsOpenUsingNotification(); Debug.Log("[ShareAndExperienceDemo]: isOpenUsingNotification " + isOpenUsingNotification); if(isOpenUsingNotification == 1){ //do something here }else{ //do something here } }
/// <summary> /// Raises the build event. /// </summary> public static void OnBuild( ) { // 起動時Push通知のバッヂアイコンを非表示にする. LocalNotificationPlugin.SetLocalPushBadgeIconNonDisplay( ); }