danger.net.tpns
Class Notification

java.lang.Object
  extended by danger.net.tpns.Notification


EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.

public abstract class Notification
extends Object

A Notification is received by the client from a partner via the Third Party Notification Server (TPNS). A Notification is delivered to the client as the argument in the callback Event supplied by the client during the SubscriptionManager.subscribe() call.

Please Note: These APIs are part of a new device-service protocol being implemented for applications.

While these APIs exist in the device OS and are available for future planning purposes, please be aware that the service-side support for these APIs may or may not be in production at this time. Third parties wishing to deploy these APIs in an application are encouraged to contact Danger for implementation requirements.

Since:
4.5
See Also:
SubscriptionManager

Method Summary
abstract  byte[] getBinaryMessage()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Returns the notification as an array of bytes.
 String getSubscriptionID()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Returns the subscription ID of the TPNS subscription that this notification is being delivered for.
abstract  String getTextMessage()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Returns the notification message as a text string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSubscriptionID

public String getSubscriptionID()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Returns the subscription ID of the TPNS subscription that this notification is being delivered for.

Returns:
the subscriptionID

getTextMessage

public abstract String getTextMessage()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Returns the notification message as a text string. If the original message was sent as a byte array, then the default charset it used to decode the byte array into a string.

Returns:
the textMessage

getBinaryMessage

public abstract byte[] getBinaryMessage()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Returns the notification as an array of bytes.

Returns:
the binary message