In application background state, I want to fetch some data from API then store them into Hive database. for running task in background, I use workmanager package and added necessary code to fetch data from API and save that into Hive database.
But it returns me error everytime.
LateInitializationError: Field '_my_hive_Box@66472566' has not been initialized.
this saying my hive box is not initialized. But I initialize them in the main()
is there any way to solve this hive box initialization?