Something that helped me was putting:
await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
just before:
BackgroundTaskBuilder builder = new BackgroundTaskBuilder();
builder.Name = backgroundTaskName;
builder.TaskEntryPoint = typeof(WindowsRuntimeComponent1.MyTask).FullName;
builder.SetTrigger(new PushNotificationTrigger());
builder.Register();
Now, open the 'tools' dialog from your emulator and select the 'Notifications' tab. Check the 'simulator' box.
IMPORTANT: Uninstall the app from the emulator then re-run it from visual studio. Once the app runs you should see your AppId and URI(if you don't then click the 'Refresh' button) in the 'Tools' dialog. You should now be able to set what type of notification you want and the payload text. I hope this helps.