-1
  • Current Working implementation : We have implemented notification through custom code in Xamarin.Forms as below:

On Resume of the application, we check certain conditions through Web API (Web API checks a flag in the SQL Server Database). If the conditions are met, We Open a display alert which is our notification.This is more of a polling Approach to the backend.

Rather than above, We want a Push notification from the backend to the Xamarin.Forms/Android/IOS whichever works.

Note : We are not using Azure anywhere, Both our WEB API and Backend host(SQL SERVER Database) are on premise.

  • So what's the question, do you have any specific problem with enabling push notifications? – Timo Salomäki Mar 15 '17 at 12:17
  • No. How do we go about implementing it in this case ? Also, Will it add value ?. DO we still have to check the database flag through web api from our mobiles ? – Kumar Mayank Mar 15 '17 at 12:31
  • https://learn.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-push – Timo Salomäki Mar 15 '17 at 12:33
  • Does this involve hosting the Web Api to Azure ? – Kumar Mayank Mar 15 '17 at 12:43
  • Yes, I missed that part. Here's another getting started guide: https://xamarinhelp.com/push-notifications/ Your question is too broad so it's impossible to answer here. You should try to implement the push notifications and come here with specific questions if something doesn't work. Also, look here: http://stackoverflow.com/questions/29029709/how-to-use-push-notifications-in-xamarin-forms – Timo Salomäki Mar 15 '17 at 12:46
  • see its very simple.Currently there is a notification wherein App checks a flag in the table (SQL Server database) through web service (ASP .Net Web API) & if that flag is 1, the app pops up a display alert.On clicking yes in that alert Data Refresh Process (coded entirely in the App) happens and data is updated in the mobile. My question is : 1) How to replace this mechanism with push notification & 2) Is is beneficial doing so – Kumar Mayank Mar 15 '17 at 12:58
  • I understand what you're looking for but this is not a code writing service. You need to try to implement the push notifications by yourself first and then ask more specific questions if you can't get it to work. The two articles I linked to are good starting points for the development. – Timo Salomäki Mar 15 '17 at 13:02

1 Answers1

1

I have used this approach in other projects:

Android GCM: https://developer.xamarin.com/guides/android/application_fundamentals/notifications/remote-notifications-with-gcm/

iOS: https://developer.xamarin.com/guides/ios/application_fundamentals/notifications/remote_notifications_in_ios/

I have followed those guides and they have worked before, hope this helps.

Mario Galván
  • 3,964
  • 6
  • 29
  • 39