# RemoteIntent

Summary:[Constants](https://developer.android.com/reference/com/google/android/wearable/intent/RemoteIntent#constants)\|[Ctors](https://developer.android.com/reference/com/google/android/wearable/intent/RemoteIntent#pubctors)\|[Methods](https://developer.android.com/reference/com/google/android/wearable/intent/RemoteIntent#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/com/google/android/wearable/intent/RemoteIntent#inhmethods)  

# RemoteIntent

`
public


class
RemoteIntent
`  
`

extends `[Object](http://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|-------------------------------------------------|
| [java.lang.Object](http://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | com.google.android.wearable.intent.RemoteIntent |

<br />

*** ** * ** ***

<br />

**This class is deprecated.**   
use`androidx.wear.remote.interactions.RemoteActivityHelper`provided by the[Jetpack Wear Remote Interactions](https://developer.android.com/jetpack/androidx/releases/wear)library instead.

Support for opening android intents on other devices.

The following example opens play store for the given app on another device:  

```
 RemoteIntent.startRemoteActivity(context, new Intent(Intent.ACTION_VIEW)
     .setData(Uri.parse("http://play.google.com/store/apps/details?id=com.example.myapp")),
     null, nodeId);
 
```

<br />

## Summary

|                                                                                                                                                            ### Constants                                                                                                                                                             ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [RESULT_FAILED](https://developer.android.com/reference/com/google/android/wearable/intent/RemoteIntent.html#RESULT_FAILED) Result code passed to[ResultReceiver.send(int, Bundle)](http://developer.android.com/reference/android/os/ResultReceiver.html#send(int,%20android.os.Bundle))when a remote intent failed to send. |
| `int` | [RESULT_OK](https://developer.android.com/reference/com/google/android/wearable/intent/RemoteIntent.html#RESULT_OK) Result code passed to[ResultReceiver.send(int, Bundle)](http://developer.android.com/reference/android/os/ResultReceiver.html#send(int,%20android.os.Bundle))when a remote intent was sent successfully.  |

|                                                        ### Public constructors                                                         ||
|-------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[RemoteIntent](https://developer.android.com/reference/com/google/android/wearable/intent/RemoteIntent.html#RemoteIntent())`() ` |

|                                                                                                                                                                                                                                                                                                                                 ### Public methods                                                                                                                                                                                                                                                                                                                                 ||
|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static void` | ` `[startRemoteActivity](https://developer.android.com/reference/com/google/android/wearable/intent/RemoteIntent.html#startRemoteActivity(android.content.Context,%20android.content.Intent,%20android.os.ResultReceiver,%20java.lang.String))`(`[Context](http://developer.android.com/reference/android/content/Context.html)` context, `[Intent](http://developer.android.com/reference/android/content/Intent.html)` intent, `[ResultReceiver](http://developer.android.com/reference/android/os/ResultReceiver.html)` resultReceiver, `[String](http://developer.android.com/reference/java/lang/String.html)` nodeId) ` Start an activity on another device. |
| ` static void` | ` `[startRemoteActivity](https://developer.android.com/reference/com/google/android/wearable/intent/RemoteIntent.html#startRemoteActivity(android.content.Context,%20android.content.Intent,%20android.os.ResultReceiver))`(`[Context](http://developer.android.com/reference/android/content/Context.html)` context, `[Intent](http://developer.android.com/reference/android/content/Intent.html)` intent, `[ResultReceiver](http://developer.android.com/reference/android/os/ResultReceiver.html)` resultReceiver) ` Start an activity on another device.                                                                                                      |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](http://developer.android.com/reference/java/lang/Object.html)` ` |------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | ` `[Object](http://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                               | | ` boolean`                                                                         | ` equals(`[Object](http://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                            | ` finalize() `                                                                            | | ` final `[Class](http://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                            | | ` int`                                                                             | ` hashCode() `                                                                            | | ` final void`                                                                      | ` notify() `                                                                              | | ` final void`                                                                      | ` notifyAll() `                                                                           | | ` `[String](http://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                            | | ` final void`                                                                      | ` wait(long arg0, int arg1) `                                                             | | ` final void`                                                                      | ` wait(long arg0) `                                                                       | | ` final void`                                                                      | ` wait() `                                                                                | ||

## Constants

### RESULT_FAILED

```
public static final int RESULT_FAILED
```

Result code passed to[ResultReceiver.send(int, Bundle)](http://developer.android.com/reference/android/os/ResultReceiver.html#send(int,%20android.os.Bundle))when a remote intent failed to send.

<br />

Constant Value: 1 (0x00000001)  

### RESULT_OK

```
public static final int RESULT_OK
```

Result code passed to[ResultReceiver.send(int, Bundle)](http://developer.android.com/reference/android/os/ResultReceiver.html#send(int,%20android.os.Bundle))when a remote intent was sent successfully.

<br />

Constant Value: 0 (0x00000000)

## Public constructors

### RemoteIntent

```
public RemoteIntent ()
```

<br />

<br />

## Public methods

### startRemoteActivity

```
public static void startRemoteActivity (Context context, 
                Intent intent, 
                ResultReceiver resultReceiver, 
                String nodeId)
```

Start an activity on another device. This api currently supports sending intents with action set to[Intent.ACTION_VIEW](http://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW), a data uri populated using[Intent.setData(Uri)](http://developer.android.com/reference/android/content/Intent.html#setData(android.net.Uri)), and with the category[Intent.CATEGORY_BROWSABLE](http://developer.android.com/reference/android/content/Intent.html#CATEGORY_BROWSABLE)present.

<br />

|                                                                                                                                                                                                                                                   Parameters                                                                                                                                                                                                                                                    ||
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context`        | `Context`: Context for sending the intent. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `intent`         | `Intent`: The intent to open on the remote device. Action must be set to[Intent.ACTION_VIEW](http://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW), a data uri must be populated using[Intent.setData(Uri)](http://developer.android.com/reference/android/content/Intent.html#setData(android.net.Uri)), and the category[Intent.CATEGORY_BROWSABLE](http://developer.android.com/reference/android/content/Intent.html#CATEGORY_BROWSABLE)must be present. <br /> |
| `resultReceiver` | `ResultReceiver`: An optional[ResultReceiver](http://developer.android.com/reference/android/os/ResultReceiver.html)to receive callbacks for the request. <br />                                                                                                                                                                                                                                                                                                                              |
| `nodeId`         | `String`: Wear OS node id for the device where the activity should be started. If null, and the current device is a watch, the activity will start on the companion phone device. Otherwise, the activity will start on all connected watch devices. <br />                                                                                                                                                                                                                                   |

### startRemoteActivity

```
public static void startRemoteActivity (Context context, 
                Intent intent, 
                ResultReceiver resultReceiver)
```

Start an activity on another device. This api currently supports sending intents with action set to[Intent.ACTION_VIEW](http://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW), a data uri populated using[Intent.setData(Uri)](http://developer.android.com/reference/android/content/Intent.html#setData(android.net.Uri)), and with the category[Intent.CATEGORY_BROWSABLE](http://developer.android.com/reference/android/content/Intent.html#CATEGORY_BROWSABLE)present. If the current device is a watch, the activity will start on the companion phone device. Otherwise, the activity will start on all connected watch devices.

<br />

|                                                                                                                                                                                                                                                   Parameters                                                                                                                                                                                                                                                    ||
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context`        | `Context`: Context for sending the intent. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `intent`         | `Intent`: The intent to open on the remote device. Action must be set to[Intent.ACTION_VIEW](http://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW), a data uri must be populated using[Intent.setData(Uri)](http://developer.android.com/reference/android/content/Intent.html#setData(android.net.Uri)), and the category[Intent.CATEGORY_BROWSABLE](http://developer.android.com/reference/android/content/Intent.html#CATEGORY_BROWSABLE)must be present. <br /> |
| `resultReceiver` | `ResultReceiver`: An optional[ResultReceiver](http://developer.android.com/reference/android/os/ResultReceiver.html)to receive callbacks for the request. <br />                                                                                                                                                                                                                                                                                                                              |

**See also:**

- [for starting an activity on
  a single device by Wear OS node id.](https://developer.android.com/reference/com/google/android/wearable/intent/RemoteIntent.html#startRemoteActivity(android.content.Context,%20android.content.Intent,%20android.os.ResultReceiver,%20java.lang.String))