I want to execute my own function when a push notification (raw message from azure) is received even when the app is not running. And the user doesn't need to click the notification in action bar.
i tried this way "Execute some function after raw push notifications is received from server in Window Phone 8.1"
but i am not getting background event, even azure send raw message successfully, but toast message is working
i registered my appname at MS development dashboard , and i tried windows phone silverlight 8.1 and runtime too...
Please help me thank you in advance.....
After long research , I can able to get raw notification from background, this time i am used MS push sample server (http://pushtestserver.azurewebsites.net/wns/) which needs URI,Package Security Identifier (SID) and Client Secret.
(universal app)
var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
string uri = channel.Uri;
Package Security Identifier (SID) and Client Secret can get from developer dashboard (you should have developer account to get dashboard)
Right click on your WPproject 'store->Associate App with the Store...' follow instructions... (https://azure.microsoft.com/en-in/documentation/articles/notification-hubs-windows-store-dotnet-get-started-wns-push-notification/) check for 'Register your app for the Windows Store'
Set Tost capable 'yes' and Lock screen notification is 'badge or badge/Tiletest' in Package.appxmanifest
(Windows phone 8.1 Silver light)
1 and 2 same as universal app
4 same as universal app
Hint: Raw notification sample form Microsoft is not fully implemented for windows phone, to work for windows phone please create background project and add reference to your windows phone project.