Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get userinfo of a remote notification #77

Open
MaxMaioli opened this issue Mar 11, 2022 · 0 comments
Open

get userinfo of a remote notification #77

MaxMaioli opened this issue Mar 11, 2022 · 0 comments

Comments

@MaxMaioli
Copy link

MaxMaioli commented Mar 11, 2022

Hallo Stan, i'm very happy with your plugin, i love it.
I'm using the remote notifications, but i can get userinfo to work.

Here is the payload of my push:

{
"APNS_SANDBOX": "{"aps":{"alert":"A new app is available to download.","badge":1,"sound":"default"},"custom":{"link":"[https://download.mylink.com](https://download.mylink.com/)"}}"
}

i expected to get the custom node info using the function GetUserInfo but is it always null.

My unity code is:

Class UserInfo
`
using System.Collections.Generic;

[System.Serializable]
public class UserInfo
{
public List custom;
public int status;
}

[System.Serializable]
public class mycustom
{
public string link;
}
`

code to retrieve the notifications:

`
ISN_UNUserNotificationCenter.GetDeliveredNotifications((result) =>
{
Debug.Log("TotaleNotifiche: " + result.Count);

        foreach (ISN_UNNotification item in result)
        {
            Debug.Log(item.Request.Content.GetUserInfo<UserInfo>());
        }

        ISN_UIApplication.ApplicationIconBadgeNumber = result.Count;
    });

`

please, can you help me?

thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant