With the help of an intent, an Android app developer can open Termius from within his or her app and auto-fill details for a new host entry. It is possible to auto-fill the following details: connection type – SSH or telnet, username, hostname, port and password.
To open Termius and auto-fill connecting details, you will need to:
- create an intent,
- set intent action,
- add intent data to URI,
- start intent.
The intent given below as example passes the following connecting details: SSH as connection type, 'root' as username, '127.0.0.1' as hostname, '22' as port.
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("ssh://firstname.lastname@example.org:22");
To pass a password, use the putExtra method (on an additional line):
Was this article helpful?
1 out of 1 found this helpful
How to add alias as well?