Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way to interact with the android app via python? #95

Open
diggedypomme opened this issue Feb 14, 2024 · 3 comments
Open

Way to interact with the android app via python? #95

diggedypomme opened this issue Feb 14, 2024 · 3 comments

Comments

@diggedypomme
Copy link

The android version of this works great via the android phone app, but via termux and running the python, the bluetooth doesn't work (due to termux, not this repo). I am running a separate python app and want to print out - is there a setup that can be used to interact and push images to the backend of the android app without using the web front end? I was trying to get it working via post to /set but I'm struggling with it, so any advice would be great. Thank you

@NaitLee
Copy link
Owner

NaitLee commented Feb 14, 2024

The android app do have the server listening on 127.0.0.1:8095, so leaving the app background and doing http requests with programs will work.

You can see API endpoints in the server code, and see how to interact with it by seeking for calls to this function in frontend code.

Most api data is in JSON, posting to individual endpoints /*; sending printing data is via posting raw PBM image data to /print.

PBM image can be converted from other image with imagemagick, or be created easily by some programming.

Any language would be ok for this task. If you need any example code, just ask :)

@diggedypomme
Copy link
Author

Awesome thank you. I got it working - printed my first hello message.

@bgcheck
Copy link

bgcheck commented Apr 12, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants