After talking to the team at PubNub there is a fix on the development branch that should be available on the master branch soon via their C# github repo (https://github.com/pubnub/c-sharp/tree/master/windows-phone-8).
PubNub Windows Phone 8 (Connects only when in Debug mode)
-
09-07-2023 - |
Question
I am trying to connect to pubnub via Windows Phone 8.
But the connection only takes place when I debug the application on the device.
If the app isn't debugging it no longer connects I also don't see any errors (no MessageBox or app crashes).
private void PubnubCallbackResult(string result)
{
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
MessageBox.Show("RESULT CALLBACK: " + result.ToString());
});
}
private void PubnubConnectCallbackResult(string result)
{
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
MessageBox.Show("CONNECT CALLBACK: " + result.ToString());
});
}
private void PubnubDisconnectCallbackResult(string result)
{
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
MessageBox.Show("DISCONNECT CALLBACK: :" + result.ToString());
});
}
private void PubnubDisplayErrorMessage(PubnubClientError result)
{
if (!hideErrorCallbackMsg)
{
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
MessageBox.Show("ERROR CALLBACK: :" + result.ToString());
});
}
}
Solution
OTHER TIPS
AJ, does the sample app for WP8 work for you? It is available here:
https://github.com/pubnub/c-sharp/tree/master/windows-phone-8
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow