Handle PubNub status and connection categories
masterThe status(PubNub pubnub, PNStatus status) callback is used to monitor the connection state.
For PNSubscribeOperation and PNUnsubscribeOperation, check the status.getCategory() to determine the specific state:
PNConnectedCategory: Successfully connected.PNReconnectedCategory: Temporary failure followed by reconnection.PNDisconnectedCategory: Successfully unsubscribed.PNUnexpectedDisconnectCategory: Error (e.g., internet connection issue).PNAccessDeniedCategory: Error (e.g., PAM permission issue).
For PNHeartbeatOperation, use status.isError() to check if the heartbeat failed.