Message.Builder | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Languages
close

- - Get Started
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
    - Get the SDK
  - Google Services
- - Google Play
  - Publishing
  - Promoting
  - App Quality
  - Spotlight
  - Open Distribution

## Results

Loading...
Summary: Ctors | Methods | Inherited Methods | [Expand All]
public static final class

# Message.Builder

extends Object

java.lang.Object
↳ | com.google.android.gcm.server.Message.Builder

## Summary

Public Constructors
| Message.Builder()

Public Methods
Message.Builder | addData(String key, String value) Adds a key/value pair to the payload data.
Message | build()
Message.Builder | collapseKey(String value) Sets the collapseKey property.
Message.Builder | delayWhileIdle(boolean value) Sets the delayWhileIdle property (default value is false).
Message.Builder | timeToLive(int value) Sets the time to live, in seconds.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Constructors

#### public Message.Builder ()

## Public Methods

#### public Message.Builder addData (String key, String value)

Adds a key/value pair to the payload data.

#### public Message build ()

#### public Message.Builder collapseKey (String value)

Sets the collapseKey property.

#### public Message.Builder delayWhileIdle (boolean value)

Sets the delayWhileIdle property (default value is false).

#### public Message.Builder timeToLive (int value)

Sets the time to live, in seconds.