Skip to content

When the application gets paused, or destroyed while doing an asynchronous call, it crashes. #4

@timch326

Description

@timch326

This could be done easily by rotating the screen while the system is logging in.

The Android Application Lifecycle does not automatically preserve asynchronous tasks when an activity is destroyed (e.g. when the user changes screen orientantion) hence AsyncTask objects, or any asynchronous routine, need to be attached to Android Fragments.
Android allows some Fragments to be retained so it can bypass Android's destroy-create cycle, so AsyncTasks can be preserved by being attached to them. (Source)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions