mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
RunCommandService: update information about usage
This commit is contained in:
@@ -18,17 +18,15 @@ import java.util.Properties;
|
|||||||
* When allow-external-apps property is set to "true", Termux is able to process execute intents
|
* When allow-external-apps property is set to "true", Termux is able to process execute intents
|
||||||
* sent by third-party applications.
|
* sent by third-party applications.
|
||||||
*
|
*
|
||||||
* Third-party program must declare com.termux.permission.RUN_COMMAND permission.
|
* Third-party program must declare com.termux.permission.RUN_COMMAND permission and it should be
|
||||||
|
* granted by user.
|
||||||
*
|
*
|
||||||
* Intent expects following configuration:
|
* Sample code to run command "top":
|
||||||
*
|
* Intent intent = new Intent();
|
||||||
* Action: com.termux.RUN_COMMAND
|
* intent.setClassName("com.termux", "com.termux.app.RunCommandService");
|
||||||
* Program/script path (string): com.termux.RUN_COMMAND_PATH
|
* intent.setAction("com.termux.RUN_COMMAND");
|
||||||
* Program/script arguments (string): com.termux.RUN_COMMAND_ARGUMENTS
|
* intent.putExtra("com.termux.RUN_COMMAND_PATH", "/data/data/com.termux/files/usr/bin/top");
|
||||||
* Session working directory (string): com.termux.RUN_COMMAND_WORKDIR
|
* startService(intent);
|
||||||
*
|
|
||||||
* Sample intent for launching program "top" in equivalent of ADB command:
|
|
||||||
* am startservice -a com.termux.RUN_COMMAND --es com.termux.RUN_COMMAND_PATH /data/data/com.termux/files/usr/bin/top
|
|
||||||
*/
|
*/
|
||||||
public class RunCommandService extends Service {
|
public class RunCommandService extends Service {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user