public final class ImageDisplay extends ServiceConnector implements IImageDisplay
ServiceConnector.InternalServiceConnection
ACTION_BIND_V2, SERVICES_PACKAGE
Modifier and Type | Method and Description |
---|---|
ImageDisplayResult |
clear()
Clear the screen by using a white image.
|
ImageDisplayResult |
closeSession()
Close image display session.
|
static ImageDisplay |
getInstance(android.content.Context context) |
protected java.lang.String |
getServiceName()
Must be overrided to provide service class name used for binding.
|
protected void |
onServiceReady(android.os.IBinder service)
Internal callback when service is connected.
|
protected void |
onServiceUnbinded()
Internal callback when service is disconnected.
|
ImageDisplayResult |
openSession()
Open image display session.
|
ImageDisplayResult |
postImage(android.graphics.Bitmap image)
Send the bitmap to the customer screen.
|
connect, connectSync, disconnect, ensureServiceIsReady, getBindIntent, getContext, isConnected
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connect, disconnect, isConnected
public static ImageDisplay getInstance(android.content.Context context)
protected java.lang.String getServiceName()
ServiceConnector
getServiceName
in class ServiceConnector
protected void onServiceReady(android.os.IBinder service)
ServiceConnector
onServiceReady
in class ServiceConnector
protected void onServiceUnbinded()
ServiceConnector
onServiceUnbinded
in class ServiceConnector
public ImageDisplayResult openSession() throws IngenicoException
openSession
in interface IImageDisplay
IngenicoException
- when session opening failspublic ImageDisplayResult closeSession() throws IngenicoException
closeSession
in interface IImageDisplay
IngenicoException
- when the session closing failspublic ImageDisplayResult clear() throws IngenicoException
clear
in interface IImageDisplay
IngenicoException
- when clearing the screen failspublic ImageDisplayResult postImage(android.graphics.Bitmap image) throws IngenicoException
postImage
in interface IImageDisplay
image
- bitmap object to sendIngenicoException
- when the image display fails