question

hardikadroja510 avatar image
hardikadroja510 asked hardikadroja510 commented

How to set listener in my android app when Create new order from register app

Please any one guide me like how can I set listener at the time complete order. Actually I want to add dynamic text into HARD COPY print receipt on order wise.

Orders
10 |2000

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

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered hardikadroja510 commented
8 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.

Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

This needs to be qualified a bit. There isn't a way to indefinitely listen for order updates because Android may remove your process because of memory / resource pressure from other apps. The best you can do is register your listener in a foreground service but even that is not guaranteed to keep it running.

The correct thing is to use Work Manager to periodically wake up and perform some work. This may not support your use case well however since Work Manager jobs aren't guaranteed to run at any particular time, and if you try to wake up frequently the OS is going to throttle your jobs.

1 Like 1 ·
hardikadroja510 avatar image hardikadroja510 Jeffrey Blattman ♦♦ commented ·

I want to print dynamic text in Hardcopy print. Smart receipts just use only for static text. Can you please help me like how can i render below the hard copy receipt at last ?

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ hardikadroja510 commented ·

David linked your two options above. You can use the Receipt Registration mechanism, with the caveat that it only applies to printed receipts, not web.

0 Likes 0 ·
Show more comments
hardikadroja510 avatar image hardikadroja510 commented ·

How can we append dynamic text at the time of print receipt in HARD COPY ?

Can you please advise me the place where we can add our text and this text append into receipt HARD COPY.

0 Likes 0 ·
1593628510417.png (31.9 KiB)
David Marginian avatar image David Marginian ♦♦ hardikadroja510 commented ·

Note: Listening for Order updates has nothing to do with this. My original answer was answering your question "Please any one guide me like how can I set listener at the time complete order."

https://docs.clover.com/docs/smart-receipts

https://community.clover.com/questions/18335/how-to-add-custom-text-to-footer-of-receipt.html

1 Like 1 ·
hardikadroja510 avatar image hardikadroja510 David Marginian ♦♦ commented ·

I want to print dynamic text in Hardcopy print. Smart receipts just use only for static text. Can you please help me like how can i render below the hard copy receipt at last ?

0 Likes 0 ·
Show more comments

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