Replies: 2 comments 1 reply
-
The foreground method no longer exists. The docs just haven't been updated |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ah thanks no wonder why I couldn't see in the code either, what's the best way to receive foreground notificaitons? The pushdelegate doesn't seem to pick up anything when the app is in the foreground(background works fine), also what happens with silent notifications? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Trying to setup push notifications for my Maui app and following the example on the website:
using System.Reactive.Linq;
using Shiny;
using Shiny.Push;
public class PushForeground
{
public void YourMethod()
{
var push = Host.Current.Services.GetService(); // assign through DI, static, or ShinyHost.Resolve
var disp = push
.WhenReceived()
.Where(x => x["newdata"] == "true")
.SubscribeAsync(async data =>
{
// make you HTTP call here
});
}
}
But when i try this bit of code it says IPushManager (this is resolving fine) does not contain defintion for WhenReceived()?
What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions