Giter Club home page Giter Club logo

androidcupsprint's Introduction

AndroidCupsPrint

Port of cups4j to Android.

See it live on the Github: https://github.com/RebornQ/AndroidCupsPrint/releases

Original work

Original work was created by BenoitDuffez, it included an app that reacts to the SEND intent to print documents.

Original work can be found here: https://github.com/BenoitDuffez/AndroidCupsPrint

Modifications

This app was modified in several ways:

  • project structure converted to gradle format
  • added support for Android PrintService so that it can print documents straight from almost all apps
  • removed all legacy code that allowed printing without the use of Android PrintService (this is removed because of minSdkVersion=19, meaning all targets of this app are PrintService-compliant)
  • fixed SSL code to properly handle self-signed certificates (as it is likely the case with home printers)
  • removed jars and added source code to be compatible with an f-droid.org publication

Print Service

Print service works at the framework level:

Android framework Print Services

See the Wiki for more information about how to use it.

As per the code, the following has been added:

  • a service in the AndroidManifest.xml file that registers the app as a PrintService
  • CupsPrinterDiscoverySession.java: handles printer discovery and printer management
  • CupsService.java: handles Android framework connectivity and print jobs management
  • removed all legacy code (pre API 19)

How to use

Please be sure you have installed the app.

Add printer service

  1. Go to setting and find this.add_printer_01
  2. Choose Add printeradd_printer_02
  3. Fill your printer information.add_printer_03_04
  4. Enjoy it.

Remove printer service

  1. Open the app in launcher.remove_printer_01
  2. Click the item to remove the printer.remove_printer_02

Contribute

This app wasn't widely tested, it needs your help for better quality. If you find bugs, either submit a new issue or fork/fix/submit PR.

Please use the develop branch for testing and troubleshooting.

Branches

  • The p_support branch was created in an effort to support Android P.
  • The master branch is code published to Google Play.
  • The jonbanjo branch is the app containing all the legacy code written by Jon Freeman
  • The fdroid branch was created in an effort to be compatible with f-droid.org; however, this effort was merged into develop and is intended to be merged into master.

License

LGPL

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301  USA

Original license information by Jon Freeman:

Redistribution and use of AndroidCupsPrint in source and binary forms,
with or without modification, is permitted provided this notice
is retained in source code redistributions and that recipients
agree that AndroidCupsPrint is provided "as is", without warranty of
any kind, express or " implied, including but not limited to the
warranties of merchantability, fitness for a particular purpose,
title and non-infringement. In no event shall the copyright holders
or anyone distributing the software be liable for any damages or
other liability, whether in contract, tort or otherwise, arising
from, out of or in connection with the software or the use or
other dealings in the software.

External libraries

  • A modified version of cups4j 0.63. The original source code and further details about cups4j may be found at http://www.cups4j.org/ (licensed under the LGPL license)
  • JmDNS This is licensed under the Apache License

androidcupsprint's People

Contributors

benoitduffez avatar chrisapps4u avatar gemba avatar gtbx avatar hubertzhang avatar macearl avatar maniac103 avatar naofum avatar rebornq avatar sjjh avatar speachy avatar thescrabi avatar tobe101 avatar

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.