Skip to content

Retain session and make it portable across instances (Android compatibility) #5

@abonander

Description

@abonander

Currently, RAW4J does not retain session, which means that it needs a call to Reddit.login() for every instance of the class before any action can be taken. This can lead to a lot of superfluous requests.

The API returns a reddit_session cookie which should be passed in later requests. There is a system-wide cookie handler that should be holding onto this, but it may or may not get destroyed at an arbitrary time by the system.

Different components in an Android application cannot share instances of a class unless it is a singleton.

The session cookie should be accessible as a String which can then be passed to different Reddit instances, perhaps with a restoreSession(String) method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions