ANDROID by niusheng11

VIEWS: 403 PAGES: 25

									Android Printing Framework

                           Tân Quang Sang – R&D Manager

         ISB Vietnam Co., Ltd.                       1
•   Problem statement
•   Challenges
•   Results
•   Demo
•   Future development
•   IVC in brief

                   ISB Vietnam Co., Ltd.   2

      “Put” printing ability to Android platform

• Provide Printing solution for Android OS
• Provide Printing API for developing Android Printing
• Support printing by: USB, IPP (Internet Printing Protocol),
  Bluetooth, Samba, LPR/LPD, …

                          ISB Vietnam Co., Ltd.                 3
• Choose CUPS (Common Unix Printing
  System) to deploy printing solution
• Porting CUPS, printer’s drivers filters
• Develop APF (Android Printing Framework)
  to provide API for printing
• Develop Printing Manager using APF

                 ISB Vietnam Co., Ltd.       4

               ISB Vietnam Co., Ltd.   5
Architecture (2)

• Libraries
  –   Port CUPS (Common Unix Printing System)
  –   Port CUPS dependencies: Ghost script, libusb, …
  –   Port Printer drivers & filters: hpcups, foo2zjs, …
  –   Support printing by command lines

                          ISB Vietnam Co., Ltd.            6
Architecture (3)

• Application framework
  –   Develop Android Printing Framework (APF)
  –   Provide API to develop Printing applications
  –   APF connect CUPS libraries to call printing functions
  –   Provide Printer, PrinterList, PrintJob, PrintJobList classes to
      support printing

                           ISB Vietnam Co., Ltd.                        7
Architecture (4)

• Application
  – Printer Manager: Insert/Delete/Modify printer
  – Print Job: Print/Pause/Resume/Cancel/Restart job
  – Other applications: use Android Printing Framework to
    develop more and more Printing applications.

                        ISB Vietnam Co., Ltd.               8

• Porting CUPS
  – CUPS is deployed on UNIX and Linux, not on Android (a
    customized & limited Linux)
  – Library “libc” of Android has been modified, cannot
    support some functions, so that we need to port them too.
  – Android has not supported some libraries needed to run

                       ISB Vietnam Co., Ltd.                    9
Challenges (2)

• CUPS is a big source code
  – At this time, we ported CUPS and 12 CUPS dependency
    packages = 598 + 5864 files
• Permission problem:
  – Permission on Android is much limited.
  – Cannot use “root” permission, so that we change to “app”
    permission to run CUPS

                       ISB Vietnam Co., Ltd.                   10
Challenges (3)

• Run-time environment:
  – System structure: /system, /var, /etc, … are all different
  – Environment valuables: Path, …
• Reduce footprint
  – The problem is how to customize CUPS & APF as
    smaller as possible

                        ISB Vietnam Co., Ltd.                    11
• Time:
  – 7 months for porting CUPS, printer drivers and filters
  – 5 months for developing APF, provide printing API
  – 3 months for developing Printing Manager using APF
• Modules:
  – Porting 13 CUPS components with 598 source code files
  – Porting 12 dependency packages with 5864 source code
  – Developing 4 APF components with 42 sources code files

                         ISB Vietnam Co., Ltd.               12
Result (2)
• Support Protocol:
  – Direct USB
  – IPP (Internet Printing Protocol): Client and Server

• Support Printer:
  – Support about 80 printer models include: HP,
    Samsung, Oki, Xerox, Lexmark, Minolta,
  – Tested on HP-LaserJet-P1006 model

                       ISB Vietnam Co., Ltd.              13
Devices tested

• Beagle Board

• Armadillo Board

                    ISB Vietnam Co., Ltd.   14
Devices tested

• Free Scale Board

• Motorola Milestone XT720

                     ISB Vietnam Co., Ltd.   15
• Detect printers connected by: USB, IPP (Internet Printing
  Protocol) , Bluetooth.




                        ISB Vietnam Co., Ltd.                 16
Functions (2)
•   Insert/Delete/Update printers
•   Manage printers through PrinterList class
•   Print/Pause/Resume/Cancel/Restart print jobs
•   Manage print job through PrintJobList class
•   Can be both Client and Print Server


                      Print Server                     Client

                         ISB Vietnam Co., Ltd.                  17
Functions (3)
• Provide PrintDialog class as user interface to modify Print
• Support to print these file types:
   – TXT, PDF, PS (Postscript), XQX, …
   – Image: JPG, BMP, PNG, TIF, PNM, …

                         ISB Vietnam Co., Ltd.                  18
Android Printing Framework


                 ISB Vietnam Co., Ltd.   19
Future development

• Support more protocols: Samba, LPR/LPD, …

• Expand more printing file types: DOC, EXL,
  PPT, HTML, …

                  ISB Vietnam Co., Ltd.        20
Future development (2)

• Provide PrintPreview class as user interface
  support to view printing files

• Support more and more printer models

                   ISB Vietnam Co., Ltd.         21
Future development (3)

• These functions will be developed in future
  – Support Fax function

  – Support Scan function

                      ISB Vietnam Co., Ltd.     22

    Will be available soon on

            ISB Vietnam Co., Ltd.   23
IVC in brief
•   ISB Vietnam Company
•   Capital: 1 mil. USD - 100% Japan investment
•   ~ 150 staffs
•   HO: eTown, 364 Cong Hoa, Tan Binh, HCMC
    – Hanoi Branch: DMC Building, 535 Kim Ma St., Ba Dinh Dist. (from June 01,
• Business:
    – Outsourcing
    – Producing
    – Android training and certificates (OESF program)
• Sectors
    – Mobile development: telecom, cell phone application, embedded
    – Business application: banking, finance, production, HR,…
    – R&D

                               ISB Vietnam Co., Ltd.                         24

      ISB Vietnam Co., Ltd.   25

To top