Struct gcm::NotificationBuilder [] [src]

pub struct NotificationBuilder<'a> { /* fields omitted */ }

A builder to get a Notification instance.

Examples

use gcm::NotificationBuilder;

let notification = NotificationBuilder::new("India vs. Australia")
    .body("3 runs to win in 1 ball")
    .finalize();

Methods

impl<'a> NotificationBuilder<'a>
[src]

Get a new NotificationBuilder instance, with a title.

Set the body of the notification

Set the notification icon. Defaults to myicon

Set the sound to be played

Set the badge for iOS notifications

Tagging a notification allows you to replace existing notifications with the same tag with this new notification

The color of the icon, in #rrggbb format

What happens when the user clicks on the notification. Refer to https://developers.google.com/cloud-messaging/http-server-ref#table2 for details.

Set the body key string for localization

String value to replace format specifiers in the body string.

Set the title key string for localization

String value to replace format specifiers in the title string.

Complete the build and get a Notification instance