Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The APN UDR types include the following UDRs;

  • APNUDR
  • APNResult

APNUDR

When the APN agent receives a an APNUDR, it sends out the message contained to the Apple device indicated by the DeviceToken.

...

The following fields are included in the APNUDR UDR:

Field
Description
Body (string)This field contains the body of the text message to be sent.
CustomPayload (string)

This field contains a custom message that includes all the tags to be included in the message. When this field is not set to null, it will override the contents of the Body and Title fields.

Info
titleExample - CustomPayload


Code Block
{"acme2" : [ "bang",  "whiz" ]}



DeviceToken (string)This field contains the token to the device the message is to be sent to.
Title (string)This field contains the title of the text message to be sent.


Info
titleExample - Generated message from Body and Title fields

APL:

Code Block
consume {    
	APNUDR aUDR = udrCreate(APNUDR);
	aUDR.Body ="This is an example.";
	aUDR.DeviceToken="7bd78578c2d702201cb291cdec4ad8e736c893b531deae602451e80617b53ae9";
	aUDR.Title="Example Title";
	udrRoute(aUDR);
}

Message:

Code Block
{"aps":{"alert":{"body":"This is an example.","title":"Example Title"}}}


APNResult

When the APN agent has sent out a text message based on a received APNUDR UDR, it returns an APNResult UDR.

...

The following fields are included in the APNUDR UDR:

Field
Description
Code (int)This field contains the result code of the attempt to send a push notification; 0 - OK, 1 - Rejected, 2 - Timed out, or 3 - Error.
Message (string)

This field contains a descriptive text for each result code:

0 - Empty
1 - Message from Apple describing the reason for a rejection
2 - Timeout
3 - Content of any exception that has occurred

Notification (APNUDR)This field contains the original APNUDR UDR that the agent received.


Scroll ignore
scroll-viewportfalse
scroll-pdftrue
scroll-officefalse
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmlfalse


Next subsection: