How to setup Shiny.Notifications on net7.0-android & net7.0-ios? #1194
Unanswered
vallgrenerik
asked this question in
Q&A
Replies: 1 comment
-
If you are going through all of this just for notifications, I wouldn't recommend it. Please also note that I'm not supporting anything around the alphas. I'll help you with this set of answers below and that's it!
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! 😊
I'm new to Shiny and starting to investigate how to use it.
I really think it looks promising.
I'm in the process of porting a old Xamarin.Android and Xamarin.iOS application to .net7.0.
When I read the documentation and try the samples I guess that plain net7.0-android and net7.0-ios is not the main focus of this project. The examples are for MAUI and I completely understand that.
But are there any technical limitations for using the new (still alpha versions) Shiny.Notifications on net7.0?
I've done some testing and the notifications partly work.
It seems to work good on iOS and partly on Android.
This is a example from MainActivity: (the project is a file new net7.0-android)
The notification appears as expected.
But when I try to schedule the notification, like this:
The notification does not appear.
When I'm using the source code from this repo I can see that an exception comes from
ShinyBroadcastReceiver.cs
when calling:protected T Resolve() => Host.Current.Services.GetRequiredService()!;
The exception message is:
ServiceProvider is not initialized - This means you have not setup Shiny correctly
So I guess I have to try to Initilize in some other way.
When I try it on my production app, using MvvmCross I get the same error.
Do you have any ideas how to solve this, or if its possible?
Thanks alot if you have the time to answer ❤️
Beta Was this translation helpful? Give feedback.
All reactions