exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 6 question 9 discussion

Actual exam question from Microsoft's AZ-204
Question #: 9
Topic #: 6
[All AZ-204 Questions]

HOTSPOT -
You develop a news and blog content app for Windows devices.
A notification must arrive on a user's device when there is a new article available for them to view.
You need to implement push notifications.
How should you complete the code segment? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: NotificationHubClient -

Box 2: NotificationHubClient -
Box 3: CreateClientFromConnectionString
// Initialize the Notification Hub
NotificationHubClient hub = NotificationHubClient.CreateClientFromConnectionString(listenConnString, hubName);
Box 4: SendWindowsNativeNotificationAsync
Send the push notification.
var result = await hub.SendWindowsNativeNotificationAsync(windowsToastPayload);
Reference:
https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-push-notification-registration-management https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/app-service-mobile/app-service-mobile-windows-store-dotnet-get-started-push.md

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
sumitg
Highly Voted 3 years, 8 months ago
Answer is correct.
upvoted 46 times
...
Tom87
Highly Voted 3 years, 7 months ago
The answer is correct, but the first reference is not very helpful and the second one doesn't even exists. Here are references of the methods used in the answer: https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.notificationhubs.notificationhubclient.createclientfromconnectionstring?view=azure-dotnet#Microsoft_Azure_NotificationHubs_NotificationHubClient_CreateClientFromConnectionString_System_String_System_String_ https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.notificationhubs.notificationhubclient.sendwindowsnativenotificationasync?view=azure-dotnet#Microsoft_Azure_NotificationHubs_NotificationHubClient_SendWindowsNativeNotificationAsync_System_String_
upvoted 21 times
...
Razvan_C
Most Recent 1 year ago
Is this one still a valid question for AZ-204? Didn't see anything about Notification Hubs in study guide anymore.
upvoted 2 times
bp_a_user
11 months, 2 weeks ago
....and it is only this question that seems not to appear in the study guide :)
upvoted 1 times
...
...
Sivaramakrishnan
2 years, 9 months ago
This the GitHub link https://github.com/uglide/azure-content/blob/master/articles/app-service-mobile/app-service-mobile-windows-store-dotnet-get-started-push.md
upvoted 5 times
...
florodevops
2 years, 10 months ago
1- NotificationHubClient 2 - NotificationHubClient 3- CreateClientFromConnectionString 4- SendWindowsNativeNotificationAsync
upvoted 7 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...