Ionic Storage cleared after Android Swipe To Close

Experiencing some odd behaviour in our application which uses Ionic Storage

We’re using version 2.1.3 of Storage. On an Android device if we go to settings-apps and Force Close the app, the storage is retained when you re-start the app. But if you Swipe to close the app (from the recently opened apps button) and then re-start the app, storage has been cleared.

On iOS we get the expected behaviour (swipe to kill the app does not clear the storage).

Has anyone else experienced this?

Ionic Info:

cli packages: (/Users/richardshergold/IonicProjects/app/myApp/node_modules)

    @ionic/cli-utils  : 1.17.0
    ionic (Ionic CLI) : 3.17.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.4
    Cordova Platforms  : android 6.2.3 ios 4.5.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.2
    Node       : v6.11.4
    npm        : 2.15.12
    OS         : macOS High Sierra
    Xcode      : Xcode 9.1 Build version 9B55

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

Ignore this - I think I might be wrong!

1 Like

no you are not wrong. Replicated on my android 10. Ionic version 5.0.2.
Sometimes it works suddenly it stops working when app is killed.