https://kotlinlang.org logo
#android
Title
# android
p

pascalchidi

03/12/2021, 7:21 PM
I’m using androidX DataStore but i get the error of mutiple instance because i’m creating an instance of my preference class in all fragment and activity. How can i stop this error by reducing the number of instances. ?
u

Umar Ata

03/13/2021, 7:54 AM
Create a method in application class and use application context to create instance and make it synchronised