예제 #1
0
    private void Start()
    {
        var currentItem = QuickActionsManager.GetCurrentItem();

        if (currentItem == null)
        {
            CurrentItemLabel.text = "No item";
        }
        else
        {
            CurrentItemLabel.text = currentItem.Type;
        }
    }
예제 #2
0
 private void OnApplicationPause(bool pauseStatus)
 {
     //app returned from background - checking for item
     if (pauseStatus == false)
     {
         var currentItem = QuickActionsManager.GetCurrentItem();
         if (currentItem == null)
         {
             CurrentItemLabel.text = "No item ";
         }
         else
         {
             CurrentItemLabel.text = currentItem.Type + "  " + currentItem.Title + "  " + currentItem.Subtitle;
         }
     }
 }
예제 #3
0
    public void OnGetItem()
    {
        var numberOfItems = QuickActionsManager.GetNumberOfShortcuts();

        if (numberOfItems == 0)
        {
            ZeroItem.text = "No item";
        }
        var zeroItem = QuickActionsManager.GetCurrentItem();

        if (zeroItem == null)
        {
            ZeroItem.text = "No item";
        }
        else
        {
            ZeroItem.text = zeroItem.Type + "  " + zeroItem.Title + "  " + zeroItem.Subtitle;
        }
    }
예제 #4
0
 public void RemoveZeroItem()
 {
     QuickActionsManager.RemoveItemAtIndex(0);
 }
예제 #5
0
    public void OnSetItemWithDefaultIcon()
    {
        var item = new QuickActionItem("com.testapp.testactionDefault", "action test Unity", "test subtitle", "", QuickActionDefaultIcon.Home);

        QuickActionsManager.SetItem(item);
    }
예제 #6
0
    public void OnSetItemWithCustomIcon()
    {
        var item = new QuickActionItem("com.testapp.testaction", "test action Unity", "test subtitle", "testIcon.png");

        QuickActionsManager.SetItem(item);
    }
예제 #7
0
    public void OnGetNumberOfItems()
    {
        var numberOfItem = QuickActionsManager.GetNumberOfShortcuts();

        NumberOfItemsText.text = string.Format("" + numberOfItem);
    }