SelectUpgrading Pocket PC V3 to V4

  • V3 exposes PubNubMessaging.Core
  • V4 exposes PubnubApi
 Always set the UUID to uniquely identify the user or device that connects to PubNub. This UUID should be persisted, and should remain unchanged for the lifetime of the user or the device. Not setting the UUID can significantly impact your billing if your account uses the Monthly Active Users (MAUs) based pricing model, and can also lead to unexpected behavior if you have Presence enabled.
  • V3 initiates via:
    Pubnub(string publishKey, string subscribeKey, string secretKey, string cipherKey, bool sslOn)
  • V4 initiates via:
    Pubnub(PNConfiguration config)
  • V3 has DetailedHistory request.
  • V4 has History request.
  • V3 contains all arguments(with few overloaded) in the same generic method call:
    pubnub.DetailedHistory<string>(channel:"hi", count: 100, includeToken: true, userCallback: DisplayReturnMessage, errorCallback: DisplayErrorMessage)
  • V4 uses fluent style method calls.
    pubnub.History()
        .Channel("hi")
        .Count(100)
        .IncludeTimetoken(true)
        .Async(new PNHistoryResultExt((result, status) => {
        }));
  • V3 sends the response either as string or object. User needs to parse the output of callback.
  • V4 sends the response as static object(Eg. PNHistoryResult, PNPublishResult) based on the request.
  • V3 subscribe supports string or object types. It does not support custom classes.
  • V4 subscribe supports custom classes.
  • V3 publish supports JSON serialized message with pubnub.EnableJsonEncodingForPublish = false.
  • V4 publish do not support anymore with serialized JSON messages. SDK expects full object as the message payload.
  • V3 exposes the connect/disconnect callbacks on subscribe.
  • V4 exposes the functionality via the listener on status portion of the listener, please listen to PNConnectedCategory/PNDisconnectedCategory on the status category.
  • V3 exposes Presence() method for connecting/disconnect presence subscribes.
  • V4 exposes the Presence functionality as part of Subscribe. Use WithPresence to enable presence. Presence callback handled via the listener on presence portion of the listener, please listen to PNPresenceEventResult on the Presence callback.
  • V3 exposes logging capability through config appSettings(Non-PCL) and through pubnub. SetPubnubLog(IPubnubLog pubnubLog) method.
  • V4 exposes logging capability through PNLogVerbosity.BODY of PNConfiguration. IPubnubLog needs to be implemented and set PubnubLog of PNConfiguration.
  • V3 by default sets EnableResumeOnReconnect to true to re-try connect when interne/network fails.
  • V4 by default sets PNReconnectionPolicy.NONE for ReconnectionPolicy of PNConfiguration.