You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.
In my use case I have to check for a String stored in SecuredPreference in Application class onCreate() method.
For that I try to get the String from SecuredPreference in onCreate of MyApplication class. but here most of the times, SecuredPreference returns null values.
If i add same code in my activity, it returns non null value.
Looks like SecuredPreference is taking time to intialize. Any hints on why this is happening. Let me know in case additional info is needed for this.
The text was updated successfully, but these errors were encountered:
PFB my answers inline : Did you use common preference filename for your shared preferences? : Yes I used common preference File name. Which context passed in SecurePreferences constructor? IN Application class's onCreate(), context of application is passed. In case of LauncherActivity class, context of Launcher Activity is passed.
Problem somehow can be caused by decryption itself : If it was problem caused by decryption, than it would exist everywhere, but in my case only in Application class's onCreate it is returning null.
I hope it clears the issue.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In my use case I have to check for a String stored in SecuredPreference in Application class onCreate() method.
For that I try to get the String from SecuredPreference in onCreate of MyApplication class. but here most of the times, SecuredPreference returns null values.
If i add same code in my activity, it returns non null value.
Looks like SecuredPreference is taking time to intialize. Any hints on why this is happening. Let me know in case additional info is needed for this.
The text was updated successfully, but these errors were encountered: