Ejemplo n.º 1
0
    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
        }
    }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
 private void CleanNotification()
 {
     LocalNotificationPlugin.ClearNotifications();
     foreach (int num in this._notificationIdList)
     {
         LocalNotificationPlugin.CancelNotification(num);
     }
     this._notificationIdList.Clear();
 }
Ejemplo n.º 4
0
    // 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("(^-^)");
    }
Ejemplo n.º 5
0
    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;
    }
Ejemplo n.º 6
0
    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);
    }
Ejemplo n.º 7
0
    // 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
        }
    }
Ejemplo n.º 8
0
 public void CancelNotification()
 {
     LocalNotificationPlugin.Remove(id);
 }
Ejemplo n.º 9
0
    public void SetLocalNotification()
    {
        id++;

        LocalNotificationPlugin.Add(id, "通知タイトル " + id, "通知本文", 15);
    }
Ejemplo n.º 10
0
    // Use this for initialization
    void Start()
    {
        id = 0;

        LocalNotificationPlugin.Init();
    }
Ejemplo n.º 11
0
    // 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( );
 }