CountrySpecification | 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
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Inherited Constants | Fields | Ctors | Methods | Inherited Methods | [Expand All]
public class

# CountrySpecification

extends Object
implements SafeParcelable

java.lang.Object
↳ | com.google.android.gms.wallet.CountrySpecification

## Class Overview

Parcelable representing a country.

## Summary

[Expand] Inherited Constants
From interface android.os.Parcelable
int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |
From interface com.google.android.gms.common.internal.safeparcel.SafeParcelable
String | NULL |

Fields
public static final Creator<CountrySpecification> | CREATOR |

Public Constructors
| CountrySpecification(String countryCode) Constructs a country specification based on a country code.

Public Methods
int | describeContents()
String | getCountryCode()
int | getVersionCode()
void | writeToParcel(Parcel dest, int flags)

[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)
From interface android.os.Parcelable
abstract int | describeContents()
abstract void | writeToParcel(Parcel arg0, int arg1)

## Fields

#### public static final Creator<CountrySpecification> CREATOR

## Public Constructors

#### public CountrySpecification (String countryCode)

Constructs a country specification based on a country code. Country code should follow the ISO 3166-2 format (ex: "US", "CA", "JP"). Providing a country code that is not supported or malformed will return `ERROR_CODE_INVALID_PARAMETERS`.

##### Parameters

countryCode | an ISO 3166-2 formatted country code

## Public Methods

#### public int describeContents ()

#### public String getCountryCode ()

##### Returns

- the country code for this specification.

#### public int getVersionCode ()

#### public void writeToParcel (Parcel dest, int flags)