SelectBlackBerry Misc API Reference for Realtime Apps

 

This SDK has been deprecated.

If you have questions about the PubNub for BlackBerry SDK, please contact us at support@pubnub.com.

This function will return a 17 digit precision Unix epoch.
 
Timetoken
The timetoken is constructed using the following algorithm:
timetoken = (Unix epoch time in seconds) * 10000000
Example of creating a timetoken for a specific time and date
08/19/2013 @ 9:20pm in UTC = 1376961606
timetoken = 1376961606 * 10000000
timetoken = 13769616060000000
To fetch Time you can use the following method(s) in BlackBerry SDK
  1. ParameterTypeRequiredDescription
    callbackCallbackYesAn object of Callback class which contains successCallback and errorCallback
Callback callback = new Callback() {
    public void successCallback(String channel, Object response) {
        System.out.println(response.toString());
    }
    public void errorCallback(String channel, PubnubError error) {
        System.out.println(error.toString());
    }
};
pubnub.time(callback);
The time() function returns a string timetoken in the following format:

13769501243685161