If a lazy is not initialised, you haven’t used it before. What’s the issue with what you describe?
k
kagomez
02/18/2020, 1:22 PM
I need the instance to be there in order for the presenter to react whenever the deeplink is triggered; if is not initialized it will just skip the call
kagomez
02/18/2020, 4:36 PM
The benefits of a lazy instance is that it knows how to provide and initialize the instance on the first call; by not having the instance initialized by the inject is just avoiding the execution
a
aipok
02/18/2020, 4:50 PM
You can try to have the
get
call in the block there you are using the presenter. Does the presenter has some long running initialization? This could be the reason why it is not there at the time you want to use it.
Also this will not keep the instance until activity is being destroyed. Unless of cause, if you are using it in some other methods of your activity.
k
kagomez
02/18/2020, 5:22 PM
The presenter is injecting the values; thanks I will try with using