Michael Sabin
Michael Sabin

Reputation: 1759

Windows Phone App Background HTTP Connectivity

I am working on developing a non-VoIP Windows Phone application that needs to have a background HTTP connection to be notified when new messages are received. I noticed for Windows Store apps, there is an example for ControlChannelTrigger that allows you to connect an HttpRequestMessage and will send a push notification to the app when data is returned by the http request.

Is there a similar concept that I can use for Windows Phone, because just using a Periodic Task really isn't good enough.

Upvotes: 0

Views: 100

Answers (1)

MakanWG
MakanWG

Reputation: 165

You cannot do that with Windows Phone. Once your app is not on the foreground anymore, there is no way for it to maintain a connection.

You should instead look into push notifications implementation here.

There was a trick where you could use a background audio agent to maintain the connection but I don't think it's still doable. And is considered a very bad practice from both a developer and a user points of view.

So you should just go with the standard push notification thing linked above.

Upvotes: 1

Related Questions