Agasper / unity-android-notifications

Unity3D Plugin for Android local notifications with example project
Other
555 stars 184 forks source link

Actions #123

Open ColorTwist opened 5 years ago

ColorTwist commented 5 years ago

Can someone please explain the purpose of Actions with this plugin? And what does Foreground = false means?

I assume that OnAction function is triggered when a user pressed Push notification for us to detect what was pressed and do some stuff. I did a few tests, and OnAction never gets triggered, i am using Android Oreo 8.0. Did anyone manage to make OnAction work?

 LocalNotification.Action action1 = new LocalNotification.Action("background", "In Background", this);
 action1.Foreground = false;

And the OnAction:

public void OnAction(string identifier)
    {
        Debug.Log("Got action " + identifier);
    }
DragonplusOuyang commented 5 years ago

I did test android 5.0-8.0, But the OnAction never triggered.

ColorTwist commented 5 years ago

Thanks for the update @DragonplusOuyang

It's a core malfunction. If anyone managed to make it work, please update.