Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Running on android (termux) #71

Closed
ronizzel opened this issue Jun 4, 2021 · 5 comments
Closed

Running on android (termux) #71

ronizzel opened this issue Jun 4, 2021 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@ronizzel
Copy link
Contributor

ronizzel commented Jun 4, 2021

It's just a hint, that might be added to README: it's surprisingly easy to run the bot on android smartphones.

All you need is termux (https://termux.com/), install python and maybe openssh to copy files and test everything from pc. Works for me without trouble, but maybe energy saving will make some in the future, I will see.

@sibalzer
Copy link
Owner

sibalzer commented Jun 4, 2021

Keep me updated!

If it works well I'll put a tutorial in the readme. I'm just afraid ads the energy saving profiles of different manufacturers can be problematic. (https://dontkillmyapp.com/)

@ronizzel
Copy link
Contributor Author

ronizzel commented Jun 5, 2021

I am running it since yesterday and it was killed only one time. After applying the options (https://dontkillmyapp.com/) is suggesting for my smartphone (xiaomi) it wasn't killed again since last evening. (It even found one free slot while riding my bike, but when I stopped and tried to book, it was already to late).

I would simply make a list of commands to set it up as a short tutorial. However, I did it quick and dirty by installing and setting up sshd and then copying the files with scp from my already setup directory on the pc, etc, which worked fine. I guess, for a tutorial I should list the commands to download the source code, unpack, etc? The disadvantage would be, that you have to do all the configuration on the phone (editing the config file as well).

Also I wonder, wether one can trigger a push message from within termux. For me so far, sending mails to three of my permanently checked accounts and one telegram gives me enough of alarm. (edit: with "Termux:API" this would be possible, perhaps even with opening the website on hitting that notification; within impfbot either a shell command needs to be called, or: https://pypi.org/project/termux-api/)

@sibalzer
Copy link
Owner

sibalzer commented Jun 8, 2021

A list of Commands would be fine. But i think we should make seperate files for more tutorials e.g. docs/SETUP_ANDROID.md. Can you make a PR?

Maybe termux accepts dbus? That would be the simplest solution.

@ronizzel
Copy link
Contributor Author

ronizzel commented Jun 8, 2021

So I just posted a PR (actually my first anywhere). Hope I followed all important rules and didn't mess anything up.

The problem I'm describing in the tutorial, what happens, when Internet connection is lost, might be a bug repairable by checking, wether another public IP is accessible?

Dbus does'nt seem to be compatible with android or termux. It would be a new function to implement push notification via termux, but I'm not sure wether it's really necessary.

@sibalzer sibalzer added the documentation Improvements or additions to documentation label Jun 8, 2021
@sibalzer
Copy link
Owner

sibalzer commented Jun 9, 2021

Thank you!

With #41 it should detect if there is an connection error, needs to be tested on termux.

If there is a demand we can implement the termux api but it's already a very specific use case, so I would make it completely optional to not increase the config unnecessarily.

closed with #87 🚀

@sibalzer sibalzer closed this as completed Jun 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants