com.abc.terminalfactory

## Class UsbSmartCard

- java.lang.Object
- - com.abc.terminalfactory.UsbSmartCard

-     public class UsbSmartCard
      extends java.lang.Object

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `getCopyright()` It returns the copyright information.
    `TerminalFactory` | `getFactory()` Returns the terminal factory that was used to create this terminal
    `static UsbSmartCard` | `getInstance(Context context)` The getInstance() function is a static method that returns a singleton instance of the UsbSmartCard class
    `UsbTerminalManager` | `getManager()` This function returns the UsbTerminalManager object that is used to communicate with USB terminal devices
    `static java.lang.String` | `getVersion()` This function returns the version of the library
    `void` | `onResume()` This method re-registers usb receivers and re-enumerates usb devices if connection is lost
    `void` | `onStop()` This method un-registers usb receivers
    `static CardTerminals` | `terminals()` An alternative method (workaround) for obtaining CardTerminals directly bypass TerminalFactory, Provider implementation can be different on older versions of android.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static UsbSmartCard getInstance(Context context)

      The getInstance() function is a static method that returns a singleton instance of the UsbSmartCard class
      Parameters:
        `context` - The context of the calling activity.
      Returns:
        The UsbSmartCard object.

    - #### onStop

          public void onStop()

      This method un-registers usb receivers

      Example: protected void onStop() { UsbSmartCard.getInstance(this).onStop(); super.onStop(); }

    - #### onResume

          public void onResume()

      This method re-registers usb receivers and re-enumerates usb devices if connection is lost

      Example: protected void onResume() { UsbSmartCard.getInstance(this).onResume(); super.onResume(); }

    - #### getFactory

          public TerminalFactory getFactory()

      Returns the terminal factory that was used to create this terminal

      Example: terminalFactory = UsbSmartCard.getInstance(this).getFactory();

      Returns:
        The TerminalFactory object.

    - #### terminals

          public static CardTerminals terminals()

      An alternative method (workaround) for obtaining CardTerminals directly bypass TerminalFactory, Provider implementation can be different on older versions of android.

      Example: CardTerminals cardTerminals = UsbSmartCard.getInstance(this).terminals();

      Returns:
        JSR268 CardTerminals

    - #### getVersion

          public static java.lang.String getVersion()

      This function returns the version of the library
      Returns:
        The version of the library.

    - #### getCopyright

          public static java.lang.String getCopyright()

      It returns the copyright information.
      Returns:
        The copyright statement.

    - #### getManager

          public UsbTerminalManager getManager()

      This function returns the UsbTerminalManager object that is used to communicate with USB terminal devices
      Returns:
        The UsbTerminalManager object.