빠른 질문. 응용 프로그램이 myChannel_ShellToastNotificationReceived 함수가 호출되어야한다 전경에있는 동안 나는 토스트 알림을 수신 그렇다면Windows phone 7 포어 그라운드에 앱이있는 토스트 알림
myChannel.ShellToastNotificationReceived += new EventHandler<NotificationEventArgs>(myChannel_ShellToastNotificationReceived);
: 내가 이런 짓을. 이 함수에서 내가 가진 :
void myChannel_ShellToastNotificationReceived(object sender, NotificationEventArgs e)
{
Dispatcher.BeginInvoke(() =>
{
ApplicationTitle.Text = "Toast Notification Message Received";
});
}
문제는 함수가 호출되지 않습니다 것을하고이 ApplicationTitle은 변경되지 않습니다.
뭐가 잘못 되었나요?
실제로 알림을 수신했는지 확인할 수 있습니까? – abhinav
응용 프로그램이 포 그라운드에 있지 않은 경우 토스트 메시지가 화면 상단에 나타납니다 ... 그래서 생각 ... 그래서 그냥 응용 프로그램을 떠나 내 서비스가 밀어를 보내도록 지시하면 작동합니다. 그러나 포 그라운드에있을 때가 아닙니다. –