You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/notification-hubs/configure-notification-hub-portal-pns-settings.md
+72-24Lines changed: 72 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to set up Azure Notification Hubs in the Azure portal by
4
4
services: notification-hubs
5
5
author: sethmanheim
6
6
manager: femila
7
-
editor: jwargo
7
+
editor: dbradish-microsoft
8
8
9
9
ms.service: notification-hubs
10
10
ms.workload: mobile
@@ -15,13 +15,13 @@ ms.reviewer: jowargo
15
15
ms.lastreviewed: 02/14/2019
16
16
---
17
17
18
-
# Set up push notifications in a notification hub in the Azure portal
18
+
# Quickstart: Set up push notifications in a notification hub
19
19
20
20
Azure Notification Hubs provides a push engine that's easy to use and that scales out. Use Notification Hubs to send notifications to any platform (iOS, Android, Windows, Baidu) and from any back end (cloud or on-premises). For more information, see [What is Azure Notification Hubs?](notification-hubs-push-notification-overview.md).
21
21
22
-
In this quickstart, you'll use the platform notification system (PNS) settings in Notification Hubs to set up push notifications on multiple platforms. The quickstart shows you the steps to take in the Azure portal.
22
+
In this quickstart, you'll use the platform notification system (PNS) settings in Notification Hubs to set up push notifications on multiple platforms. The quickstart shows you the steps to take in the Azure portal.[Google Firebase Cloud Messaging](/azure/notification-hubs/configure-notification-hub-portal-pns-settings?tabs=azure-cli#google-firebase-cloud-messaging-fcm) includes instructions for using the Azure CLI.
23
23
24
-
If you haven't already created a notification hub, create one now. For more information, see [Create an Azure notification hub in the Azure portal](create-notification-hub-portal.md).
24
+
If you haven't already created a notification hub, create one now. For more information, see [Create an Azure notification hub in the Azure portal](create-notification-hub-portal.md) or [Create an Azure notification hub using the Azure CLI](create-notification-hub-azure-cli.md)
25
25
26
26
## Apple Push Notification Service
27
27
@@ -47,19 +47,67 @@ To set up Apple Push Notification Service (APNS):
47
47
48
48
For more information, see [Push notifications to iOS by using Azure Notification Hubs](notification-hubs-ios-apple-push-notification-apns-get-started.md).
49
49
50
-
## Google Firebase Cloud Messaging
50
+
## Google Firebase Cloud Messaging (FCM)
51
51
52
-
To set up push notifications for Google Firebase Cloud Messaging (FCM):
52
+
# [Portal](#tab/azure-portal)
53
53
54
-
1. In the Azure portal, on the **Notification Hub** page, select **Google (GCM/FCM)** from the left menu.
55
-
2. Paste the **API Key** for the FCM project that you saved earlier.
56
-
3. Select **Save**.
54
+
To set up push notifications for Google FCM:
55
+
56
+
1. In the Azure portal, on the **Notification Hub** page, select **Google (GCM/FCM)** from the left menu.
57
+
2. Paste the **API Key** for the Google FCM project that you saved earlier.
58
+
3. Select **Save**.
57
59
58
60

59
61
60
-
When you complete these steps, an alert indicates that the notification hub has been successfully updated. The **Save** button is disabled.
62
+
When you complete these steps, an alert indicates that the notification hub has been successfully updated. The **Save** button is disabled.
63
+
64
+
# [Azure CLI](#tab/azure-cli)
65
+
66
+
### Prerequisites
67
+
68
+
Before you begin, you must have the following:
69
+
70
+
* The [Azure CLI](/cli/azure/install-azure-cli) version 2.0.67 or later.
71
+
72
+
* The Azure CLI [extension for Notification Hubs](/cli/azure/ext/notification-hub/notification-hub).
73
+
* The **API Key** for a Google Firebase Cloud Messaging (FCM) project.
74
+
75
+
### Set up push notifications for Google FCM
76
+
77
+
1. Use the [az notification-hub credential gcm update](/cli/azure/ext/notification-hub/notification-hub/credential/gcm#ext-notification-hub-az-notification-hub-credential-gcm-update) command to add your Google API Key to your notification hub.
2. The Android App needs a connection string to connect with the notification hub. Use the [az notification-hub authorization-rule list](/cli/azure/ext/notification-hub/notification-hub/authorization-rule#ext-notification-hub-az-notification-hub-authorization-rule-list) command to list the available access policies. Use the [az notification-hub authorization-rule list-keys](/cli/azure/ext/notification-hub/notification-hub/authorization-rule#ext-notification-hub-az-notification-hub-authorization-rule-list-keys) command to get the access policy connection strings. Specify the **primaryConnectionString** or **secondaryConnectionString** in the `--query` parameter to get the primary connection string directly.
61
84
62
-
For more information, see [Push notifications to Android devices by using Notification Hubs and Google FCM](notification-hubs-android-push-notification-google-fcm-get-started.md).
85
+
```azurecli
86
+
#list access policies for a notification hub
87
+
az notification-hub authorization-rule list --resource-group spnhubrg --namespace-name spnhubns --notification-hub-name spfcmtutorial1nhub --output table
88
+
89
+
#list keys and connection strings for a notification hub access policy
3. Use the [az notification-hub test-send](/cli/azure/ext/notification-hub/notification-hub#ext-notification-hub-az-notification-hub-test-send) command to test sending messages to the Android App.
97
+
98
+
```azurecli
99
+
#test with message body
100
+
az notification-hub test-send --resource-group spnhubrg --namespace-name spnhubns --notification-hub-name spfcmtutorial1nhub --notification-format gcm --message "my message body"
Get Azure CLI references for other platforms with the [az notification-hub credential](/cli/azure/ext/notification-hub/notification-hub/credential) command.
107
+
108
+
---
109
+
110
+
For more information on pushing notifications to an Android application, see [Send push notifications to Android devices using Firebase](notification-hubs-android-push-notification-google-fcm-get-started.md).
63
111
64
112
## Windows Push Notification Service
65
113
@@ -75,7 +123,7 @@ For information, see [Send notifications to UWP apps by using Azure Notification
75
123
76
124
## Microsoft Push Notification Service for Windows Phone
77
125
78
-
To set up Microsoft Push Notification Service (MPNS) for Windows Phone:
126
+
To set up Microsoft Push Notification Service (MPNS) for Windows Phone:
79
127
80
128
1. In the Azure portal, on the **Notification Hub** page, select **Windows Phone (MPNS)** from the left menu.
81
129
1. Enable either unauthenticated or authenticated push notifications:
@@ -92,30 +140,30 @@ To set up Microsoft Push Notification Service (MPNS) for Windows Phone:
92
140
* On the **Windows Phone (MPNS)** page, select **Save**.
93
141
94
142
For more information, see [Push notifications to Windows Phone apps by using Notification Hubs](notification-hubs-windows-mobile-push-notifications-mpns.md).
95
-
96
143
97
144
## Baidu (Android China)
98
145
99
146
To set up push notifications for Baidu:
100
147
101
-
1. In the Azure portal, on the **Notification Hub** page, select **Baidu (Android China)** from the left menu.
102
-
2. Enter the **Api Key** that you obtained from the Baidu console in the Baidu cloud push project.
103
-
3. Enter the **Secret Key** that you obtained from the Baidu console in the Baidu cloud push project.
104
-
4. Select **Save**.
148
+
1. In the Azure portal, on the **Notification Hub** page, select **Baidu (Android China)** from the left menu.
149
+
2. Enter the **Api Key** that you obtained from the Baidu console in the Baidu cloud push project.
150
+
3. Enter the **Secret Key** that you obtained from the Baidu console in the Baidu cloud push project.
151
+
4. Select **Save**.
105
152
106
153

107
154
108
-
When you complete these steps, an alert indicates that the notification hub has been successfully updated. The **Save** button is disabled.
155
+
When you complete these steps, an alert indicates that the notification hub has been successfully updated. The **Save** button is disabled.
109
156
110
157
For more information, see [Get started with Notification Hubs by using Baidu](notification-hubs-baidu-china-android-notifications-get-started.md).
111
158
112
159
## Next steps
113
-
In this quickstart, you learned how to configure platform notification system settings for a notification hub in the Azure portal.
160
+
161
+
In this quickstart, you learned how to configure platform notification system settings for a notification hub in the Azure portal.
114
162
115
163
To learn more about how to push notifications to various platforms, see these tutorials:
116
164
117
-
-[Push notifications to iOS devices by using Notification Hubs and APNS](notification-hubs-ios-apple-push-notification-apns-get-started.md)
118
-
-[Push notifications to Android devices by using Notification Hubs and Google FCM](notification-hubs-android-push-notification-google-fcm-get-started.md)
119
-
-[Push notifications to a UWP app running on a Windows device](notification-hubs-windows-store-dotnet-get-started-wns-push-notification.md)
120
-
-[Push notifications to a Windows Phone 8 app by using MPNS](notification-hubs-windows-mobile-push-notifications-mpns.md)
121
-
-[Push notifications by using Notification Hubs and Baidu cloud push](notification-hubs-baidu-china-android-notifications-get-started.md)
165
+
-[Push notifications to iOS devices by using Notification Hubs and APNS](notification-hubs-ios-apple-push-notification-apns-get-started.md)
166
+
-[Push notifications to Android devices by using Notification Hubs and Google FCM](notification-hubs-android-push-notification-google-fcm-get-started.md)
167
+
-[Push notifications to a UWP app running on a Windows device](notification-hubs-windows-store-dotnet-get-started-wns-push-notification.md)
168
+
-[Push notifications to a Windows Phone 8 app by using MPNS](notification-hubs-windows-mobile-push-notifications-mpns.md)
169
+
-[Push notifications by using Notification Hubs and Baidu cloud push](notification-hubs-baidu-china-android-notifications-get-started.md)
Copy file name to clipboardExpand all lines: articles/notification-hubs/create-notification-hub-portal.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ ms.reviewer: jowargo
15
15
ms.lastreviewed: 02/14/2019
16
16
---
17
17
18
-
# Create an Azure notification hub in the Azure portal
18
+
# Quickstart: Create an Azure notification hub in the Azure portal
19
19
Azure Notification Hubs provide an easy-to-use and scaled-out push engine that allows you to send notifications to any platform (iOS, Android, Windows, Kindle, Baidu, etc.) from any backend (cloud or on-premises). For more information about the service, see [What is Azure Notification Hubs?](notification-hubs-push-notification-overview.md).
20
20
21
21
In this quickstart, you create a notification hub in the Azure portal. The first section gives you steps to create a Notification Hubs namespace and a hub in that namespace. The second section gives you steps to create a notification hub in an existing Notification Hubs namespace.
0 commit comments