question

itadmin avatar image
itadmin asked itadmin answered

Our App times out or gets closed out by Clover POS automatically

We are having a recurring issue where our GivePay Discounts and Mobile Rewards application is being logged out after extended periods of time or after a reboot. We’ve seen other apps persist or restore their connection automatically, when this occurs.

Does anyone have any suggestions for how we can maintain and/or recover lost connections without the user/merchant restarting our app manually? Or is there a way to prompt users to login automatically after each Clover automated logout or POS reboot?

Clover Miniclover developer communitySandboxClover FlexClover Station
9 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 ·

Without knowing what your app is or how it works it's very hard to comment.

What's a "connection" as far as your app is concerned? What's a login? What does it mean to be logged out of your app? How does your app "login"? How does it store the authentication response?

Generally speaking the OS isn't concerned with those details. If you want to persist login sessions across restarts of your app's processes you need to use one of the several mechanisms Android provides for persisting data.

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

Our app is a Discount for Cash app that presents customers with a Discount Offers popup screen. The app should only require a merchant login one time from the Clover POS to our servers after mechant setup. Once the app is running, customers are presentend with discount offers after the merchant selects Pay on the Clove Register app. Merchants also can login to view the web based dashboard.

Here is a functional overview video: https://youtu.be/tnU6b4aJhDw

Here is a marketing full overivew: https://youtu.be/DIW6kQ16LIM

Thanks for all your help!

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

I'm asking technically how the login to your server works. I'd guess you retrieve some authentication token back from your servers and use that in subsequent calls to your server... but I can only speculate unless you can elaborate.

It's up to your app to persist that taken and load it when your app is started. How are you doing that? When it fails is it because the "token" is invalid, or because it's missing?

0 Likes 0 ·
itadmin avatar image itadmin commented ·

Yes, for login we retrieve authentication tokens.
How our app work is when the merchant goes to a transaction from the Register, we pop up with our discount screen, and that portion is working fine. But, When the device is restarted (rebooted) it stops giving that popup from our application in the register when we do a transaction. We have to manually go and start the application.

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

Above you were speaking about authentication tokens but I don't see any mention of that here. You need to look at what conditions your app will and will not popup. Can you debug your code and see what condition is failing after the device is rebooted?

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

We're not seeing any conditions failing, however it seems our app is in a stopped state or goes to sleep after an extended periord of time, overnight, or a device reboot. After this occurs, to reactivate (wake up) our app, it currently requires user engagment (GivePay icon to be tapped) then when minimined this seems to wake it up in the background and our discount offers screen pops-up correctly after (merchant/user) selects Pay within Clover Register screen.

Can you recomnend a background service or listener code code to help our app wake up everytime the Clover Register app is used?


Note: Please disreagard comments related to authentication tokens as we dont believe they are relevant to the app stop issue, as they are used only when our app is active.

Thank You

0 Likes 0 ·
Show more comments
itadmin avatar image
itadmin answered

Our target SDK is version 25. We think we found a fix, we'll let you know


10 |2000

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

itadmin avatar image
itadmin answered

This is solved. Now we just need our app to be approved for release in the marketplace. Thx!

10 |2000

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

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