2
srivmanu
15d

Had that moment where I thought to myself I need some sleep.
Working on Android app, using shared preferences (for a lay person, a key value store for settings)
Kept storing data in store and checked repeatedly from different parts of the app for the data. No clue where it went when storing (did store correctly)

Found out I was storing in a store labelled X _Y and was reading from store called XY.

Comments
  • 0
    I've done that before 😅
    Not android, but still.
  • 0
    Always make your key names as public static final strings. I learnt this the hard way
  • 0
    @TitanLannister that was the implementation of the function that read and returned the value requested.
    The write function used a string literal there.
Add Comment