Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code in sample app to check if the session has timed out is not working #85

Open
cmcfatter opened this issue Dec 13, 2021 · 0 comments
Open

Comments

@cmcfatter
Copy link

I am using this code from the sample app to detect if the user's session has timed out while using the app. I've pasted it below:

    if (AppManager.merchant == null) {
        Intent i = new Intent(context, LoginActivity.class);
        i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        startActivity(i);
        finish();
        return;
    }

It is not working - AppManager.mercant never comes back as null even if the session has timed out. The user does not find out that the session has timed out until they have already swiped the customer's card and it returns an error, causing them to have to repeat the login process over again. Is there another way that I can check if the session has timed out that would be more reliable? Any help would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant