Skip to content
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

Which samples would you like to see? #56

Open
mpodwysocki opened this issue Oct 31, 2018 · 15 comments
Open

Which samples would you like to see? #56

mpodwysocki opened this issue Oct 31, 2018 · 15 comments

Comments

@mpodwysocki
Copy link
Member

mpodwysocki commented Oct 31, 2018

As you have noticed, we have a number of samples in a number of languages. Going forward, as we modernize these samples, which languages would you like to see? Note that this is a poll and not any guarantee whether we will implement any of all of them.

Clients:

  • JavaScript via Cordova, Ionic, NativeScript, React Native
  • Android with Kotlin and Java
  • iOS with Swift and Objective-C

Servers:

  • NodeJS
  • Go
  • Rust
  • .NET Core
  • Java
@jimseiwert
Copy link

Client: JavaScript via Cordova, Ionic
Server: NodeJS and .Net Core

1 similar comment
@imtiyaz-c
Copy link

Client: JavaScript via Cordova, Ionic
Server: NodeJS and .Net Core

@jwargo
Copy link
Contributor

jwargo commented Feb 14, 2019

I updated the docs with an SDK page listing the different SDKs we know of (ours and third-parties. Will be published soon. On the Cordova side, I created a sample project using this SDKL: https://github.com/derek82511/cordova-azure-notification-hubs. with a sample app here: https://github.com/jwargo/cordova-azure-notification-hubs.

@folego
Copy link

folego commented Apr 22, 2019

Ionic 4 please!
I tried to use AppCenter, but I can't receive the notification event. My last try it's to use directly the Cordova Plugin.

@jwargo
Copy link
Contributor

jwargo commented Apr 22, 2019

@folego I've been trying to get the third-party Cordova plugin working in Ionic 4 and Capacitor has an issue with it. I reached out to the Ionic team, but never heard back. I will submit an issue on the Capacitor GitHub repo and see if I can get their help there.

@dbwelch
Copy link

dbwelch commented Oct 29, 2019

Xamarin Forms, a little surprised it's not already there.

@jwargo
Copy link
Contributor

jwargo commented Oct 29, 2019

@folego I've been trying to get the third-party Cordova plugin working in Ionic 4 and Capacitor has an issue with it. I reached out to the Ionic team, but never heard back. I will submit an issue on the Capacitor GitHub repo and see if I can get their help there.

Here's content from a blog post I'm publishing on Ionic 3/4:

Ionic 4 delivered big changes for Ionic. The Ionic team made a lot of changes to the framework plus released Capacitor, their alternative for Apache Cordova. Capacitor still supports Apache Cordova, but only a subset of the existing plugins. Ionic also built many common plugins into Capacitor, so you no longer ‘need’ Cordova plugins to deliver certain functionality to your app.

One example of this is the Capacitor Push Notifications plugin which adds support for registering for and processing push notifications to Capacitor. If you follow the procedure to create an Ionic 4 project, add the cordova-azure-notification-hubs plugin to it, and add the code that registers for and processes notifications like you did for Ionic 3 applications, you’ll find that your application registers successfully, but never ‘receives’ any notifications.

What’s happening is that the cordova-azure-notification-hubs plugin is properly managing the registration process with Azure Notification Hubs, but the Capacitor Push Notifications plugin intercepts all notifications that arrive on the device, circumventing the Azure Notification Hubs SDK.

This means that to automatically register for and receive notifications, your Ionic 4 application must use both plugins. The cordova-azure-notification-hubs plugin to manage automatic registration, and the Capacitor Push Notifications plugin to process them when they arrive.

We created a sample application that shows how to use the plugin in an Ionic 4 app. The sample implements the same Ionic Provider for Azure Notification Hubs that manages registration, but adds additional code to use the Capacitor Push Notifications plugin to process received notifications. With that in place, it’s basically the same UI and logic as the Ionic 3 sample (updated for changes in Ionic 4).

The Capacitor Push plugin also supports a similar registration event listener you can use to grab the device push token and send it to your app backend for Azure Notification Hubs registration. Doing this eliminates the need to use the cordova-azure-notification-hubs plugin in your Capacitor application.

@mcovertt
Copy link

mcovertt commented Dec 7, 2019

It would be great to see an example of Azure Notification Hub used with Web Push for PWA.

Client: JavaScript
Server: .NET Core

@jwargo
Copy link
Contributor

jwargo commented Dec 9, 2019

@mcovertt Unfortunately, we don't support browser notifications today although this is a capability we want to add to the service.

@seregagorl
Copy link

seregagorl commented Jan 29, 2020

@mcovertt Unfortunately, we don't support browser notifications today although this is a capability we want to add to the service.

Just to confirm: Azure Notification Hub can't be used for Push Notifications to PWA across browsers? or there is no sample for it at the moment? This sample looks relevant
https://github.com/Azure/azure-notificationhubs-samples/tree/master/PushToSafari

@jwargo
Copy link
Contributor

jwargo commented Jan 30, 2020

@seregagorl correct, it cannot. That sample is browser specific and there used to be one for Chrome as well, but Google removed the functionality we used to push to those browsers. We are very interested in adding browser push support to Azure, but we have nothing at this time.

@seregagorl
Copy link

seregagorl commented Jan 30, 2020 via email

@ShaneOsborne
Copy link

The EnterprisePushBackendSystem and 2 othe rsolutions have been removed but the original documentation https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-enterprise-push-notification-architecture still refers to this repo

@brucelane
Copy link

Hi, ionic 5 or upcoming ionic 6 with React would be nice!
I might create a PR if I succeed on my own

@drmanhatin
Copy link

drmanhatin commented Jan 17, 2022

@seregagorl correct, it cannot. That sample is browser specific and there used to be one for Chrome as well, but Google removed the functionality we used to push to those browsers. We are very interested in adding browser push support to Azure, but we have nothing at this time.

@jwargo This is a bit of a grave dig, but maybe its relevant. I have used this code to send push notifications to a PWA installed on android.

https://github.com/drmanhatin/pwa_azure_notification_services_push_notification

  1. obtain device code through pwa
  2. register device using registerdevice.js
  3. send message using sendmessage.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests