diff --git a/README.md b/README.md index a073987dce..19649eb257 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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`.