Koin how to inject outside of Android activity / appcompatactivity

There is the KoinComponent which comes to the rescue. In any class you can simply: class SampleClass : KoinComponent { val a : A? by inject() val b : B? by inject() } Extending KoinComponent gives you access to inject() method. Remember that usually it’s enough to inject stuff the usual way: class SampleClass(val a … Read more

Pass data back to previous fragment using Android Navigation

Android just released a solution for this; Passing data between Destinations (Navigation 2.3.0-alpha02), basically, in fragment A you observe changes in a variable and in fragment B you change that value before executing popBackStack(). Fragment A: findNavController().currentBackStackEntry?.savedStateHandle?.getLiveData<String>(“key”)?.observe(viewLifecycleOwner) { result -> // Do something with the result. } Fragment B: navController.previousBackStackEntry?.savedStateHandle?.set(“key”, result) navController.popBackStack()

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)