com.dynamixsoftware.intentapi
Class IntentAPI

java.lang.Object
  extended by com.dynamixsoftware.intentapi.IntentAPI

public class IntentAPI
extends java.lang.Object


Field Summary
static java.lang.String ACTION_PRINT_DOCUMENT
           
static java.lang.String ACTION_PRINT_OBJECT
           
static java.lang.String ACTION_PRINTER_LAUCNH_SERVICE
           
static java.lang.String ACTION_PRINTER_SETTINGS
           
static java.lang.String ACTION_PRINTERS_SETUP
           
 
Constructor Summary
IntentAPI(Activity mActivity)
           
 
Method Summary
 void changePrinterOptions()
          Starts current printer options change activity.
 IPrinterInfo getCurrentPrinter()
          Tries to get current printer.
 java.util.List<PrintHandOption> getFilesOptions()
           
 java.util.List<PrintHandOption> getImagesOptions()
           
 java.util.List<java.lang.String> getPrintJobs()
           
 boolean isServiceRunning()
          Checks if service is running.
 void print(IDocument document)
          Starts printing activity.
 boolean print(IJob job, int copies)
          Starts printing on current printer without PrintHands UI.
 boolean print(java.lang.String jobName, IJob job, int copies)
          Starts printing on current printer without PrintHands UI.
 void print(java.lang.String jobName, java.lang.String mimeType, Uri uri)
           
 void print(Uri uri, java.lang.String contentType, java.lang.String description)
          Starts printing activity.
 void removePrintJob(java.lang.String printJobName)
           
 boolean runService(IServiceCallback serviceCallback)
          Tries to start printing service.
 boolean setCallback(IPrintCallback printCallback)
          Callback can be set for control printing process.
 void setFilesOptions(java.util.List<PrintHandOption> options)
           
 void setImagesOptions(java.util.List<PrintHandOption> options)
           
 void setLicense(java.lang.String licenseID, ISetLicenseCallback licenseCallback)
           
 void setupCurrentPrinter()
          Starts setup printer activity.
 void stopService(IServiceCallback serviceCallback)
          Stops printing service.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_PRINT_OBJECT

public static final java.lang.String ACTION_PRINT_OBJECT
See Also:
Constant Field Values

ACTION_PRINT_DOCUMENT

public static final java.lang.String ACTION_PRINT_DOCUMENT
See Also:
Constant Field Values

ACTION_PRINTERS_SETUP

public static final java.lang.String ACTION_PRINTERS_SETUP
See Also:
Constant Field Values

ACTION_PRINTER_SETTINGS

public static final java.lang.String ACTION_PRINTER_SETTINGS
See Also:
Constant Field Values

ACTION_PRINTER_LAUCNH_SERVICE

public static final java.lang.String ACTION_PRINTER_LAUCNH_SERVICE
See Also:
Constant Field Values
Constructor Detail

IntentAPI

public IntentAPI(Activity mActivity)
Method Detail

runService

public boolean runService(IServiceCallback serviceCallback)
                   throws RemoteException
Tries to start printing service.

Returns:
true if service binded
Throws:
RemoteException

stopService

public void stopService(IServiceCallback serviceCallback)
Stops printing service.


isServiceRunning

public boolean isServiceRunning()
Checks if service is running.

Returns:
true if service is running.

setCallback

public boolean setCallback(IPrintCallback printCallback)
                    throws RemoteException
Callback can be set for control printing process.

Parameters:
printCallback - to be set.
Throws:
RemoteException

print

public void print(Uri uri,
                  java.lang.String contentType,
                  java.lang.String description)
Starts printing activity.

Parameters:
uri - to printing object
contentType - mime type of printing object
description - text description that shows in the printing activity

print

public void print(IDocument document)
           throws RemoteException
Starts printing activity.

Parameters:
document - to print
Throws:
RemoteException

getCurrentPrinter

public IPrinterInfo getCurrentPrinter()
                               throws RemoteException
Tries to get current printer.

Returns:
current printer info or null.
Throws:
RemoteException

setupCurrentPrinter

public void setupCurrentPrinter()
Starts setup printer activity.


changePrinterOptions

public void changePrinterOptions()
Starts current printer options change activity.


print

public boolean print(IJob job,
                     int copies)
              throws RemoteException
Starts printing on current printer without PrintHands UI.

Parameters:
job - to be printed
copies - number
Returns:
true if printing ended successfully
Throws:
RemoteException

print

public boolean print(java.lang.String jobName,
                     IJob job,
                     int copies)
              throws RemoteException
Starts printing on current printer without PrintHands UI.

Parameters:
job - name
job - to be printed
copies - number
Returns:
true if printing ended successfully
Throws:
RemoteException

print

public void print(java.lang.String jobName,
                  java.lang.String mimeType,
                  Uri uri)
           throws RemoteException
Throws:
RemoteException

getImagesOptions

public java.util.List<PrintHandOption> getImagesOptions()
                                                 throws RemoteException
Throws:
RemoteException

getFilesOptions

public java.util.List<PrintHandOption> getFilesOptions()
                                                throws RemoteException
Throws:
RemoteException

setImagesOptions

public void setImagesOptions(java.util.List<PrintHandOption> options)
                      throws RemoteException
Throws:
RemoteException

setFilesOptions

public void setFilesOptions(java.util.List<PrintHandOption> options)
                     throws RemoteException
Throws:
RemoteException

getPrintJobs

public java.util.List<java.lang.String> getPrintJobs()
                                              throws RemoteException
Throws:
RemoteException

removePrintJob

public void removePrintJob(java.lang.String printJobName)
                    throws RemoteException
Throws:
RemoteException

setLicense

public void setLicense(java.lang.String licenseID,
                       ISetLicenseCallback licenseCallback)