Skip to content

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

@cmcfatter

Description

@cmcfatter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions