0

I want to test if the manner in which i have handled the channelUri changes works fine. I have used the channelUriUpdated method to make note of any changes.

Trouble is i am not sure when this method will get invoked during the normal course of usage. Is there any way to generate such events for testing purposes? I dont want to submit my app without being sure that it is working fine in this condition.

Also it seems that the ChannelUri is valid for around 30 days. I cant wait that long to test this one use-case scenario. Surely there has to be a better way to test it.

Thanks!

user1122549
  • 664
  • 1
  • 13
  • 27

1 Answers1

0

There are numerous reason for a channel to expire and they are not all publically documented. Even with the ones that are known it is not possible to manually test them all.

This shouldn't matter though as your code will deal with all expiries the same way - by requesting a new channel.

Fortunately it's easy to force a channel to expire, and thereby test your handling of this, just send it an invalid payload.

Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
  • thanks for your response! Can you please explain how i can send an invalid payload? – user1122549 Sep 24 '13 at 14:21
  • Just send anything that isn't a valid Push Notification (either the content or the headers) to the ChannelUri and that will cause the channel to expire. – Matt Lacey Sep 24 '13 at 14:27