Docstoc

ANDROID

Document Sample
ANDROID Powered By Docstoc
					Android Printing Framework
            APF


                           Tân Quang Sang – R&D Manager


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



                   ISB Vietnam Co., Ltd.   2
Problem


      “Put” printing ability to Android platform

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




                          ISB Vietnam Co., Ltd.                 3
Execution
• 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
Architecture




               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
Challenges

• 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
    CUPS




                       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
Result
• 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
    files
  – 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,
    …manufacturers
  – 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
Functions
• Detect printers connected by: USB, IPP (Internet Printing
  Protocol) , Bluetooth.


                                        IPP

             USB




                          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


                                                 IPP
                USB


                      Print Server                     Client


                         ISB Vietnam Co., Ltd.                  17
Functions (3)
• Provide PrintDialog class as user interface to modify Print
  options.
• 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




               Demo


                 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
  (cont.):
  – Support Fax function




  – Support Scan function




                      ISB Vietnam Co., Ltd.     22
Download


    Will be available soon on
       developer.oesf.biz




            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,
      2011)
• 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
End




      ISB Vietnam Co., Ltd.   25

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:403
posted:7/29/2011
language:Vietnamese
pages:25