Giter Club home page Giter Club logo

printoid-aidl's Introduction

Printoid Interface

This project is made as an example of interface with the Android app "Printoid for OctoPrint":

https://printoid.net

With the interface (as an AIDL file), you will be able to communicate with Printoid from your own application.

Pre-requisited

Printoid is compatible with API level 14 and + (Ice Cream Sandwish)

How does it work

Include the .AIDL and .kt files from the Interface folder in your project. Do not change the hierarchy or the package names.

How to connect to the service

Please see example in the DemoApp.

Full guidelines and good practices are available here: https://developer.android.com/guide/components/aidl

Who can get connected

For the moment, only the MyMiniFactory application can connect to Printoid using these interfaces (package name: MyMiniFactory)

I will probably open these interfaces to everyone in the future if needed.

What are the available interfaces

For the moment, only the following interfaces are available. Please note that these interfaces will evolve in the future (but backward compatibiltiy will be kept, of course.)

/**
 * Returns the list of configured OctoPrint servers
 * in Printoid.
 */
List<ServerModel> getConfiguredServers();

/**
 * Send the passed GCODE file to the app for upload.
 * This method will start Printoid with the profile selector screen.
 *
 * @param pathToTheFile The path to the file from the storage
 */
void sendGcodeFromFile(String pathToTheFile);

/**
 * Send the passed GCODE file to the app for upload to the
 * passed server, using its id.
 *
 * @param pathToTheFile The path to the file from the storage
 * @param serverId The server ID targeted by the upload
 */
void sendGcodeFromFileToServer(String pathToTheFile, String serverId);

/**
 * Send the passed GCODE to the app for upload.
 * This method will start Printoid with the profile selector screen.
 *
 * @param fileUrl The URL to the file
 */
void sendGcodeFromUrl(String fileUrl);

/**
 * Send the passed GCODE to the app for upload to the
 * passed server, using its id.
 *
 * @param fileUrl The URL to the file
 * @param serverId The server ID targeted by the upload
 */
void sendGcodeFromUrlToServer(String fileUrl, String serverId);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.