Xamarin FCM not working while app is closed - xamarin

I am using Firebase cloud messaging for remote notification in Xamarin Android, the notification are working fine while the app is in foreground and in background but if the app is closed the notification do not arrive.
I followed step by step the Xamarin tutorial.
Any idea?

The problem happeds because VS literally kills your app, so the background proccess that listens for push notifications die, so it will no longer respond. What you have to do for test push notifications is debug and reinstall de app every single time.
Best Regards.

Related

Xamarin.IOS And Signalr Push Notification

I'm Developing A Xamarin App, I Create A Signalr Notification System That Work Fine In Both Xamarin.Android And Xamarin.IOS But It doesn't work when Xamarin.IOS App close.
Is There a way to fix this without using APN Or FCM?
Is There Way to IOS Let My app Do something even When App is Closed?
It is not possible to keep the signalr connection alive while in the background on iOS. The operating system will kill it, there is nothing you can do to stop that from happening. iOS immediately kills the app (you have 5 seconds) when going into the background, with a few exceptions.
If you are using android, you can create a foreground service to keep the signalr connection alive. Without a foreground service, android will also kill the signalr connection after a while. Android will allow a background app to run for a period of time, then will kill it, so you must have a foreground service to keep signalr connection alive.
Also be aware while in debug, iOS will allow apps to run in the background. But the released version will not allow apps to run in the background. This can make debugging signalr difficult, as it will work in debug, but not in the production version.
You will probably need to use APN for notifications. Be aware that APN requires a HTTP/2 back end server if you want to send the push notifications directly to Apples servers. Or you can use FCM to send APN.

How to schedule local-notifications when the app in background for iOS in Nativescript -angular

Hai am developing an ios application using Nativescript-angular framework.My app contains local notifications functionality using timer. but I click the home button In my phone the timer was destroyed and notifications not came. Is there anyway to run the timer when my app is in background?
In order show notifications after app is moved to background, you should use BackgroundTask.
If you like to perform any operation even when the app is not running, then you should opt for BackgroundFetch

Xamarin.Forms Launch or Wake app on bluetoothle button push

I now have a requirement for an iOS/Android app (Xamarin.Forms) to either wake or launch when a paired BluetoothLE button is pressed. The app may be in the background or even closed.
I have a POC app (modeled after Acr.Ble samples) and I'm currently using CoreBluetooth to scan and connect to the device and get services etc... I'm not sure what I need to do to get the app to wake or launch when the button is pressed.
I know Android and iOS may handle these things differently, so a cross-platform solution is not a requirement.
Any help is greatly appreciated!

Windows Phone 7.5 / 8 push notifications and PhoneGap

we developed a mobile application with PhoneGap. So far it runs fine with WinPhone, iOS, Android and Firefox OS.
We now want to add Push notifications to the app. Basically we can choose which server backend to use. Since the project is already JS-heavy (ember.js) we started with Node.js and are using node-apn and node-gcm to send notifications to iOS and Android.
Is it even possible to have a PhoneGap application register with the MPNS? So far it seems to me that only native C# Applications can register with their server as a valid endpoint (the node.js plugin for MPNS requires this endpoint to send notifications).
It seems Pushwoosh's phonegap plugin works for windows phone, but only with their service. Or did I misread something there?
The reason we wanted to have a self controlled notification server is to push notifications to Firefox OS. None of the push-services seem to support this OS yet.
Any thoughts on this topic are welcome, thx in advance.
Cheers
Tom
The Cordova Push Notifications Plugin added support for Windows Phone 8 recently.
With this plugin, you can now receive and handle Push Notifications on Android, iOS and Windows Phone 8 devices conveniently.

Windows Phone 7 push notification when the app is not running

I am trying to implement push notifications in windows phone 7.5
I bind the channelUri in App.xaml when the application starts up.
I can then switch my app to background and receive toast notifications based on the Uri.
But this requires me to first go the app and then make it to background.
Can I receive the toast without the app running? That is when the channelUri is not bound.
Is this a default behaviour in Windows phone 7 or whether I am missing a point here?
If this is the behaviour, how can I send some form of notification/ information to the phone when the app is not running?
I did see this Windows Phone 7.5 - Push Notifications when app is tombstoned.
Update:
I know the Channel is active up to 30 days, is it the same when I use only emulator?
App should be associated with a channel so as to receive notification and even when app is not running, if the notification channel is active, then the application will receive the toast
I think you are missing the point. In order to receive toast notifications you don't have to have the app running in the background. Toasts (and Tile notifications) are meant for when the app is not running at all. So, start the app to get a push-uri and then send that to the service. In theory you won't need one again after 30 days. When it comes to the emulator it will be available as long as the emulator is running. Once you shutdown/close the emulator, the push-uri is gone and you would need to re-request one. (Generally speaking, nothing is saved on the emulator and so closing and opening the emulator is like getting a new device everytime.)
Hopefully this helps

Resources