Snapshot | Android Developers

Quicknav Quicknav
Links

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

Android Sites

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

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Inherited Constants | Methods | Inherited Methods | [Expand All]
public interface

# Snapshot

implements Freezable<Snapshot> Parcelable

com.google.android.gms.games.snapshot.Snapshot

Known Indirect Subclasses SnapshotEntity
SnapshotEntity | Data object representing the data for a saved game.

## Class Overview

Data interface for a representation of a saved game. This includes both the metadata and the actual game content.

## Summary

[Expand] Inherited Constants
From interface android.os.Parcelable
int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |

Public Methods
abstract SnapshotMetadata | getMetadata() Retrieves the metadata for this snapshot.
abstract SnapshotContents | getSnapshotContents() Retrieve the `SnapshotContents` associated with this snapshot.

[Expand] Inherited Methods
From interface com.google.android.gms.common.data.Freezable
abstract Snapshot | freeze() Freeze a volatile representation into an immutable representation.
abstract boolean | isDataValid() Check to see if this object is valid for use.
From interface android.os.Parcelable
abstract int | describeContents()
abstract void | writeToParcel(Parcel arg0, int arg1)

## Public Methods

#### public abstract SnapshotMetadata getMetadata ()

Retrieves the metadata for this snapshot.

##### Returns

- The `SnapshotMetadata` associated with this snapshot.

#### public abstract SnapshotContents getSnapshotContents ()

Retrieve the `SnapshotContents` associated with this snapshot. This object can be used to update the data of a snapshot. Note that this will return null if this snapshot was not obtained via `open(GoogleApiClient, SnapshotMetadata)`.

##### Returns

- The `SnapshotContents` for this snapshot, or null if the snapshot is not opened.