Question: My Web Service returns xml.In OnInvoke method I have xml data it contains time and some text that are to be shown at given times on popup.

Answer: 
As per Unsupported APIs of Background Agents, you can not use MessageBox from Schedule Agent.
<http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202962(v=vs.105).aspx>

The best solution to display a message from Schedule Agent is Toast Notification.
Normal message box access is as follows

```
MessageBox.Show("Enter your  data here");

```

But i am not sure about the message box access while the app is in ideal. 

But you can show a Toast message, while the app is in ideal also.

here the sample code to show a Toast message 

```
 Microsoft.Phone.Shell.ShellToast toast = new Microsoft.Phone.Shell.ShellToast();
            toast.Content = "mydata";
            toast.Title = "title";
            toast.NavigationUri = new Uri("/LocationDealsPage.xaml", UriKind.Relative);
            toast.Show();

```