Wearable

public class Wearable extends Object

An API for the Android Wear platform.

Applications use API clients such as DataClient to call Android Wear services.

API clients can be created with options specific to that client, for example:


   WearableOptions options = new WearableOptions.Builder().setLooper(myLooper).build();
   DataClient dataClient = Wearable.getDataClient(context, options);
   Task<DataItem> getDataTask = dataClient.getDataItem...
 

See Wearable.WearableOptions for the supported options.

Nested Class Summary

class Wearable.WearableOptions Options for the Wearable API. 

Field Summary

public static final Api<Wearable.WearableOptions> API This field is deprecated. Use new APIs such as DataClient and MessageClient.
public static final CapabilityApi CapabilityApi This field is deprecated. Use getCapabilityClient(Activity).
public static final ChannelApi ChannelApi This field is deprecated. Use getChannelClient(Activity).
public static final DataApi DataApi This field is deprecated. Use getDataClient(Activity).
public static final MessageApi MessageApi This field is deprecated. Use getMessageClient(Activity).
public static final NodeApi NodeApi This field is deprecated. Use getNodeClient(Activity).

Public Method Summary

static CapabilityClient
getCapabilityClient(Context context)
Create a new instance of CapabilityClient for use in a non-activity Context.
static CapabilityClient
getCapabilityClient(Activity activity, Wearable.WearableOptions options)
Create a new instance of CapabilityClient for use in an Activity.
static CapabilityClient
getCapabilityClient(Context context, Wearable.WearableOptions options)
Create a new instance of CapabilityClient for use in a non-activity Context.
static CapabilityClient
getCapabilityClient(Activity activity)
Create a new instance of CapabilityClient for use in an Activity.
static ChannelClient
getChannelClient(Context context, Wearable.WearableOptions options)
Create a new instance of ChannelClient for use in a non-activity Context.
static ChannelClient
getChannelClient(Context context)
Create a new instance of ChannelClient for use in a non-activity Context.
static ChannelClient
getChannelClient(Activity activity, Wearable.WearableOptions options)
Create a new instance of ChannelClient for use in an Activity.
static ChannelClient
getChannelClient(Activity activity)
Create a new instance of ChannelClient for use in an Activity.
static DataClient
getDataClient(Activity activity, Wearable.WearableOptions options)
Create a new instance of DataClient for use in an Activity.
static DataClient
getDataClient(Activity activity)
Create a new instance of DataClient for use in an Activity.
static DataClient
getDataClient(Context context, Wearable.WearableOptions options)
Create a new instance of DataClient for use in a non-activity Context.
static DataClient
getDataClient(Context context)
Create a new instance of DataClient for use in a non-activity Context.
static MessageClient
getMessageClient(Context context, Wearable.WearableOptions options)
Create a new instance of MessageClient for use in a non-activity Context.
static MessageClient
getMessageClient(Activity activity)
Create a new instance of MessageClient for use in an Activity.
static MessageClient
getMessageClient(Context context)
Create a new instance of MessageClient for use in a non-activity Context.
static MessageClient
getMessageClient(Activity activity, Wearable.WearableOptions options)
Create a new instance of MessageClient for use in an Activity.
static NodeClient
getNodeClient(Context context)
Create a new instance of NodeClient for use in a non-activity Context.
static NodeClient
getNodeClient(Activity activity)
Create a new instance of NodeClient for use in an Activity.
static NodeClient
getNodeClient(Context context, Wearable.WearableOptions options)
Create a new instance of NodeClient for use in a non-activity Context.
static NodeClient
getNodeClient(Activity activity, Wearable.WearableOptions options)
Create a new instance of NodeClient for use in an Activity.

Inherited Method Summary

Fields

public static final Api<Wearable.WearableOptions> API

This field is deprecated.
Use new APIs such as DataClient and MessageClient.

Token to pass to GoogleApiClient.Builder.addApi(Api ) to enable the Wearable features.

public static final CapabilityApi CapabilityApi

This field is deprecated.
Use getCapabilityClient(Activity).

public static final ChannelApi ChannelApi

This field is deprecated.
Use getChannelClient(Activity).

public static final DataApi DataApi

This field is deprecated.
Use getDataClient(Activity).

public static final MessageApi MessageApi

This field is deprecated.
Use getMessageClient(Activity).

public static final NodeApi NodeApi

This field is deprecated.
Use getNodeClient(Activity).

Public Methods

public static CapabilityClient getCapabilityClient (Context context)

Create a new instance of CapabilityClient for use in a non-activity Context.

public static CapabilityClient getCapabilityClient (Activity activity, Wearable.WearableOptions options)

Create a new instance of CapabilityClient for use in an Activity.

public static CapabilityClient getCapabilityClient (Context context, Wearable.WearableOptions options)

Create a new instance of CapabilityClient for use in a non-activity Context.

public static CapabilityClient getCapabilityClient (Activity activity)

Create a new instance of CapabilityClient for use in an Activity.

public static ChannelClient getChannelClient (Context context, Wearable.WearableOptions options)

Create a new instance of ChannelClient for use in a non-activity Context.

public static ChannelClient getChannelClient (Context context)

Create a new instance of ChannelClient for use in a non-activity Context.

public static ChannelClient getChannelClient (Activity activity, Wearable.WearableOptions options)

Create a new instance of ChannelClient for use in an Activity.

public static ChannelClient getChannelClient (Activity activity)

Create a new instance of ChannelClient for use in an Activity.

public static DataClient getDataClient (Activity activity, Wearable.WearableOptions options)

Create a new instance of DataClient for use in an Activity.

public static DataClient getDataClient (Activity activity)

Create a new instance of DataClient for use in an Activity.

public static DataClient getDataClient (Context context, Wearable.WearableOptions options)

Create a new instance of DataClient for use in a non-activity Context.

public static DataClient getDataClient (Context context)

Create a new instance of DataClient for use in a non-activity Context.

public static MessageClient getMessageClient (Context context, Wearable.WearableOptions options)

Create a new instance of MessageClient for use in a non-activity Context.

public static MessageClient getMessageClient (Activity activity)

Create a new instance of MessageClient for use in an Activity.

public static MessageClient getMessageClient (Context context)

Create a new instance of MessageClient for use in a non-activity Context.

public static MessageClient getMessageClient (Activity activity, Wearable.WearableOptions options)

Create a new instance of MessageClient for use in an Activity.

public static NodeClient getNodeClient (Context context)

Create a new instance of NodeClient for use in a non-activity Context.

public static NodeClient getNodeClient (Activity activity)

Create a new instance of NodeClient for use in an Activity.

public static NodeClient getNodeClient (Context context, Wearable.WearableOptions options)

Create a new instance of NodeClient for use in a non-activity Context.

public static NodeClient getNodeClient (Activity activity, Wearable.WearableOptions options)

Create a new instance of NodeClient for use in an Activity.