Hello world activity to run some code in the onCreate
What I’m working on:
I’m currently coding a “Java Interface” for rclone:
Interface RClone: gives access to all rclone commands and options
Class RCloneImpl: Implements RClone
In the Future: Class RCloneHelper
Provides more high level functions as “CreateNewRemote”
My current Problem:
I can use rclone from termux just fine.
BUT: calling the config() method does not open a browser.
public void config(String... commands) throws IOException, InterruptedException {
// commands: {"n", "name", "7", "", "", "y", "y"}
Process process = exec("config");
InputStream inputStream = process.getInputStream();
OutputStream outputStream = process.getOutputStream();
for (int i = 0; i < 6; i++) {
String command = commands[i];
wait(inputStream, 1);
inputStream.skip(inputStream.available());
outputStream.write((command + "\n").getBytes());
outputStream.flush();
}
// yes i skip the last command, since it is not relevent until now for my current problem.
}
private void wait(InputStream inputStream, int threshold) throws InterruptedException, IOException {
while (inputStream.available() < threshold) {
Thread.sleep(200);
}
Thread.sleep(200);
}
It runs through without any exception and it writes just fine to my inputStream, but it does not open a browser.
Also when I open chrome myself and go to http://127.0.0.1:53682/auth, the page is not available.
Can someone please help me to get the authentication done.
My Project has changed its focus a bit during the last weeks.
However, i managed to get my app running. It uses rclone in the background and works fine
This is interesting. The only comment that I would make is to allow the user to optionally specify an alternative rclone binary to use (self-compiled) which you can store in the data of the app and use instead of the default one you provide. That would be VERY useful as I compile my own and sometimes we need a new beta for some things. What do you think?
thanks. Can you explain this a bit more? Without root on android I can’t replace the rclone asset unless I also compile my own android apk. Where would the file be located that I could replace it without root?
I wish i could get ENCFS and rclone to mount on my phone would make it easier to stream music to my car dash other than thru plex which seems to be music spotty.
Oh I assumed you have a rooted phone. Without root I don't know if it is possible. But it will also cause problems, e.g. the dropbox authentication has changed and won't work in the app with the new binary.