-
Notifications
You must be signed in to change notification settings - Fork 162
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
fixed android notification on close application #88
base: master
Are you sure you want to change the base?
Conversation
it's critical bug for android notification!! |
I don't know appveyor and his tests, but it's critical bug and it is necessary to quickly solve |
You are using static CrossPushNotification.PushNotificationListener. When application is closed It is equal null. because of this warning does not work in a closed application. |
Actually it does work with app closed if you initialize the plugin on an Application class. [Application]
} |
The opportunity has not always, becouse an initialization point may be in Setup.cs(MvvmCross). Can I add initialization code in Setup.cs (Setup.cs initialized in Droid.SplashScreen.cs)? |
If you want that android app work when it closed - you must include "PushNotification.Plugin.Android" from this resource and create Service.
|
I'm also having this problem please help! Everything works very well until app is closed. Then I get "Object reference not set to an instance of an object" on PushNotification.Plugin.PushNotificationGcmListener.OnMessageReceived and found the same that "CrossPushNotification.PushNotificationListener" is null when executing "CrossPushNotification.PushNotificationListener.OnMessage(values, DeviceType.Android);" I added the StartPushService() part to my Mainactivity, but it doesn't help: public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
What have I done wrong? |
CrossPushNotification.PushNotificationListener - its static and its equal null when android application close