locked
Xamarin.Forms Push Notifications RRS feed

  • Question

  • User181763 posted

    I'm currently trying to integrate Push Notifications on Xamarin.Forms in a PCL project but I have to implement it without using Microsoft Azure. Has anyone tried this or may someone guide me through it? Thank you very much!

    Wednesday, December 23, 2015 10:08 AM

Answers

  • User103165 posted

    @AlexaMayer said: I'm currently trying to integrate Push Notifications on Xamarin.Forms in a PCL project but I have to implement it without using Microsoft Azure. Has anyone tried this or may someone guide me through it? Thank you very much!

    Hi @AlexaMayer

    As @DKurkin has specified you will need to implement some level of platform specific code. Also, although you may not want to use Azure you are going to need some kind of server application somewhere who will talk to the push notification servers of Apple, Google and/or Microsoft. If not using Azure (or similar solutions) you are not only going to have to write platform specific code for your apps, but on your server-side as well because all push notification servers will have their own interface as well.

    May I ask why you do not want to use Azure? Can you maybe provide some details to what you are trying to achieve so we can provide you with better feedback?

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, December 23, 2015 12:39 PM

All replies

  • User54298 posted

    Push Notifications is PLATFORM SPECIFIC - therefore you need to create separate registration/push handlers for every platform.

    Wednesday, December 23, 2015 12:11 PM
  • User103165 posted

    @AlexaMayer said: I'm currently trying to integrate Push Notifications on Xamarin.Forms in a PCL project but I have to implement it without using Microsoft Azure. Has anyone tried this or may someone guide me through it? Thank you very much!

    Hi @AlexaMayer

    As @DKurkin has specified you will need to implement some level of platform specific code. Also, although you may not want to use Azure you are going to need some kind of server application somewhere who will talk to the push notification servers of Apple, Google and/or Microsoft. If not using Azure (or similar solutions) you are not only going to have to write platform specific code for your apps, but on your server-side as well because all push notification servers will have their own interface as well.

    May I ask why you do not want to use Azure? Can you maybe provide some details to what you are trying to achieve so we can provide you with better feedback?

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, December 23, 2015 12:39 PM
  • User2148 posted

    Exists this plugin for push notifications

    You can try...

    https://github.com/rdelrosario/xamarin-plugins/blob/master/PushNotification/README.md

    Wednesday, December 23, 2015 12:45 PM
  • User54298 posted

    @AlexaMayer
    As @GeraldVersluis mentioned - server side is important too. I can suggest you to look towards PushSharp You can find Server and Client side implementations there for all the platforms

    Wednesday, December 23, 2015 12:46 PM
  • User181763 posted

    @GeraldVersluis sorry for the late reply. I am to connect it to my Rails server but I haven't set it up yet. What I have to do is to prepare the needed stuffs to be sent on the server for push notification for both Android and iOS (which is I think what @DKurkin means), e.g. the device token and perhaps some other stuff that I do not know about. The resources mostly use Azure so I don't have any reference about this.

    @AlessandroCaliaro I'll look on to that. Thank you.

    Do excuse me for my lack of knowledge, this is my first time to work on push notifications and I just started learning Xamarin Forms.

    Wednesday, December 30, 2015 6:54 AM
  • User103165 posted

    @AlexaMayer said: @GeraldVersluis sorry for the late reply. I am to connect it to my Rails server but I haven't set it up yet. What I have to do is to prepare the needed stuffs to be sent on the server for push notification for both Android and iOS (which is I think what @DKurkin means), e.g. the device token and perhaps some other stuff that I do not know about. The resources mostly use Azure so I don't have any reference about this.

    Although the resources are about Azure, the main idea should be the same. You still need to get a token from the Google/Apple push servers that you register with your own server in this case.

    Then on your server-side determine when to send which data to which token. And make the send work! Easy, no? ;)

    If you need any more help it would be useful to see some code that you have created so far.

    Wednesday, December 30, 2015 7:32 AM
  • User181763 posted

    @GeraldVersluis thank you for the quick reply. I'll dig deep through them then.

    Actually, I have not setup anything in my app yet since I got tasked to implement the web service's push notification first. What do you think about it, should I first integrate Push Notifications on my Xamarin app before working on my Rails Server? I'm having trouble as to where to start especially on testing it.

    Wednesday, December 30, 2015 7:55 AM
  • User103165 posted

    @AlexaMayer well that is a bit of a catch-22. ;) You couldn't really test the one without the other. The way I usually do it is to implement it in the app first up to the point where I register my device on the server-side. From there you can start working on your server. Starting with an endpoint to save the device token. You then have at least one working push token which you can test with. With that token you can start working on the code to actually send a notification.

    Keep in mind that the certificate that you are sending a push notification with AND the certificate your app is signed with have to match. So you cannot send a push notification with your dev certificate to an app signed with the production certificate.

    You could also implement local notifications on your app first. These are actually just scheduled notifications that only run on your phone but use some of the same events as remote notifications. Just to get familiar with them.

    Also you say the most documentation is about Azure, note that you don't have to limit your search with the Xamarin keyword. Push notifications are the same for Objective-C/Swift or Java so just searching for 'Apple push notifications Ruby server' lets me find something like this; https://github.com/nomad/houston

    Wednesday, December 30, 2015 8:04 AM
  • User181763 posted

    @GeraldVersluis thank you very much! We need more people like you!!

    And yes, I've found that houston gem to be used for iOS, the one I'll be implementing on the server would be the Android part.

    Two thumbs up!!

    Wednesday, December 30, 2015 8:16 AM
  • User103165 posted

    @AlexaMayer Glad to hear and thank you! :)

    If you have any more questions post them here or contact me directly!

    Wednesday, December 30, 2015 8:17 AM
  • User181763 posted

    @GeraldVersluis I'll make sure to do that! Cheers!

    Wednesday, December 30, 2015 8:35 AM
  • User183885 posted

    @AlexaMayer Did you find any solution? I have the same scenario

    Wednesday, January 27, 2016 4:31 AM
  • User280067 posted

    how can i open the app when push notification comes from server side. Please give me the solution..

    Wednesday, November 30, 2016 8:29 AM