question

trueox avatar image
trueox asked David Marginian Deactivated edited

Completely severe usb connect on app close.

What do I need to call in order to completely severe the USB connection after my app closes?

Currently,

I call disconnect() and cloverconnect.dispose() on app closed. it did a good job on cleaning up the objects but the clover still connected to my PC and it still has the welcome screen. is there a way disconnect it completely once my app is closed? Currently, the only way to kill the connection is to reboot my PC or disconnect the physical USB cable which is not a good option.

semi-integrations
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered

It sounds like you want to close/kill the pay display application on the device. The only way to do that is to 4-finger exit (touch upper left, upper right, lower left, lower right) and the close the app.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

trueox avatar image
trueox answered David Marginian Deactivated edited

no, I do not want to kill the USB pay display application on the mini clover. I just want to kill the active connection after I exit my application. The USB pay display should show "not connected" after I exit my application and there should be no more active connection until I start my application again which initiated a new connection. I have call cloverclover.dispose() and clover.close() but it does not seem to work.

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image David Marginian ♦♦ commented ·

USB Pay Display listens for a USB Connection and even if you call dispose the connection between your POS and the Clover device physically exists. What you are suggesting is that calling dispose should override this, and that the device should consider itself disconnected even though the USB cable is plugged in. Assuming the device behaved as you expect, and your POS calls dispose, what happens the next time you try to connect? You will be unable to because the device thinks it is disconnected. On first thought, this doesn't seem to make a lot of sense to me. Can you explain why this is causing you problems and what your use case is?

0 Likes 0 ·
trueox avatar image trueox David Marginian ♦♦ commented ·

I just want to have a clean start over just like I just reboot my PC. The USB pay display said disconnected until I start up my app.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community