Skip to content

Commit

Permalink
Remove cleaned, extras and intent settings from documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoais committed Jul 10, 2021
1 parent f2bb872 commit 3fb9ac2
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -735,19 +735,21 @@ If no value is provided with this argument, all intents are turned on.

Currently, the only events that exist are:

| Option | Description | [Intent Action] | [Intent Extras]
| ----------|:----------------------------------------------|:---------------------------------|:-----------------------------
| `start` | scrcpy starts | `com.genymobile.scrcpy.START` | STARTUP: true
| `stop` | scrcpy stops (best effort) | `com.genymobile.scrcpy.STOP` | SHUTDOWN: true
| `cleaned` | scrcpy has finished cleaning up (best effort) | `com.genymobile.scrcpy.CLEANED` | SHUTDOWN: true
| [Intent Action] | Description |
|:--------------------------------|:----------------------------------------------|
| `com.genymobile.scrcpy.START` | scrcpy starts
| `com.genymobile.scrcpy.STOP` | scrcpy stopped and cleaned up (best effort)


[Intent Action]: https://developer.android.com/reference/android/content/Intent#setAction(java.lang.String)
[Intent Extras]: https://developer.android.com/reference/android/content/Intent#putExtra(java.lang.String,%20android.os.Parcelable)


**Important:**
1. `stop` and `cleaned` **may not happen** in specific cases. For example,
if debugging is turned off, scrcpy process is immediately killed without a chance to cleanup.
1. `stop` **may not happen** in specific cases.
Examples:
1. Debugging is turned off.
2. Scrcpy cleanup process is killed by android or another app.
2. This option is intended for advanced users. By using this
feature, all apps on your phone will know scrcpy has connected
Unless that is what you want, and you know what that means
Expand All @@ -761,17 +763,11 @@ Following [Android intent rules], all intents fields/keys prefixed with:
`com.genymobile.scrcpy.`
In case of Actions, it is followed by the intent name in caps. For example,
the 'start' intent has the action:
`com.genymobile.scrcpy.START`
`com.genymobile.scrcpy.STARTED`


[Android intent rules]: https://developer.android.com/reference/android/content/Intent#setAction(java.lang.String)

Additionally, there are two boolean fields (that may not be present) in the extra data section of the intents:

1. `com.genymobile.scrcpy.STARTUP` if present and `true`, scrcpy is starting up.
2. `com.genymobile.scrcpy.SHUTDOWN` if present and `true`, scrcpy is shutting down.

More extra fields will be present in the future.

For convinience with automation tools such as [Tasker], scrcpy also writes to the data field of the intents.
The scheme is `scrcpy-status`.
Expand Down

0 comments on commit 3fb9ac2

Please sign in to comment.