Conf file edition
I would like to see that *.conf can be directly edited from UI. Especially it would be better if network.conf can be edited on the fly.
Yes. Please. I've been having to open it in termux for the time being, which is fairly inconvenient.
Implementing correctly a graphical interface to edit keys-values would require too much work in my opinion. Contributions are welcome.
The app could also open a file manager in the configuration directory from the configuration screen.
It is currently possible to edit the configuration files from other Android applications that can access the content of the SD card. They can be edited with the Amaze file manager and its included text editor or remotely with Termux+sshd, for example.
I think the info page of a connecting network is just a good template - just make it editable. It won't cover all but still good enough (since usually other files are pre-copied to SD card and only network.conf need to be created).
Sorry for my zero knowledge on Android development, otherwise I'd like to contribute :(
The app could also open a file manager in the configuration directory from the configuration screen.
Even better, just add an "open in editor" button. It should be possible to let Android offer the correct applications (I've seen this used to good effect by other apps).
I was just going to add this as a feature request, but since this issue was already open this seemed like a better place for it.
For specific implementation ideas:
A long press on the network name should result in a menu, with a few options:
- "Open tinc.conf in editor"
- "Open network.conf in editor"
- "Open configuration directory in file manager"
- "Open log directory in file manager"
I wanted to make the links to the configuration and log directories clickable. Surprisingly and sadly, there is no way to easily launch a file browser or editor using an Intent on Android. Starting with Android N, the system forbids such Intents.
That is surprising! What a bummer.
On my device (Samsung Galaxy Tab A (2016)) the configuration is saved under /storage/emulated/0/Android/data/org.pacien.tincapp/files and termux doesn't have access to this directory (even with storage permission on Android 8.1.0). Hence, I have no way of editing the configuration. In my case, files have to be on the external SD card in order to be edited by the applications.
@Beetix wrote:
On my device (Samsung Galaxy Tab A (2016)) the configuration is saved under
/storage/emulated/0/Android/data/org.pacien.tincapp/filesand termux doesn't have access to this directory (even with storage permission on Android 8.1.0). Hence, I have no way of editing the configuration. In my case, files have to be on the external SD card in order to be edited by the applications.
I've just tested accessing the configuration directory using Termux on an emulator running Android 8.1.0. You indeed need to grant the storage access permission to Termux and restart that app, closing any running session before it can successfully access the directory.
Thank you. I confirm that it works. It's my mistake... I must have been looking under /storage/emulated/0/data/ and not /storage/emulated/0/Android/data/