public interface IPoyntCashDrawerService
extends android.os.IInterface
AccessoryManagerService#getAccessoryProviders
to get all the
available cash drawers in PoyntOS use AccessoryManagerService
Once you get list of cash drawers as AccesoryProvider
you can directly connect to
the printer using this interface. Here's the code snippet
Intent intent = new Intent();
intent.setAction(AccessoryType.CASH_DRAWER);
intent.setClassName(accessoryProvider.getPackageName(),
accessoryProvider.getClassName());
context.bindService(intent,
connection, Context.BIND_AUTO_CREATE);
Modifier and Type | Interface and Description |
---|---|
static class |
IPoyntCashDrawerService.Stub
Local-side IPC implementation stub class.
|
Modifier and Type | Method and Description |
---|---|
void |
getDrawerStatus(java.lang.String referenceId,
IPoyntCashDrawerServiceListener callback)
Get the status of cash drawer, result will be returned via listener callback.
|
void |
getDrawerStatusByName(java.lang.String name,
java.lang.String referenceId,
IPoyntCashDrawerServiceListener callback)
Get the status of cash drawer, result will be returned via listener callback.
|
void |
openDrawer(java.lang.String referenceId,
IPoyntCashDrawerServiceListener callback)
Opens the cash drawer connected through the USB interface and
return the status via listener callback.
|
void |
openDrawerByName(java.lang.String name,
java.lang.String referenceId,
IPoyntCashDrawerServiceListener callback)
Opens the cash drawer connected through the USB interface and
return the status via listener callback.
|
void openDrawer(java.lang.String referenceId, IPoyntCashDrawerServiceListener callback) throws android.os.RemoteException
referenceId
- will be passed as a part of listener.callback
- IPoyntCashDrawerServiceListener
android.os.RemoteException
void getDrawerStatus(java.lang.String referenceId, IPoyntCashDrawerServiceListener callback) throws android.os.RemoteException
name:
- name of the cash drawer,referenceId
- will be passed as a part of listener.callback
- IPoyntCashDrawerServiceListener
android.os.RemoteException
void openDrawerByName(java.lang.String name, java.lang.String referenceId, IPoyntCashDrawerServiceListener callback) throws android.os.RemoteException
name:
- name of the cash drawer,referenceId
- will be passed as a part of listener.callback
- IPoyntCashDrawerServiceListener
android.os.RemoteException
void getDrawerStatusByName(java.lang.String name, java.lang.String referenceId, IPoyntCashDrawerServiceListener callback) throws android.os.RemoteException
name:
- name of the cash drawer,referenceId
- will be passed as a part of listener.callback
- IPoyntCashDrawerServiceListener
android.os.RemoteException