if you are familiar with view models you can use a...
# android
s
if you are familiar with view models you can use a shared view model for that which would seemingly be an easier approach, otherwise like you said you can use an Interface where your activity has to implement the interface like YourActivity : Activity(), YourInterface, where your interface can declare a mutable live data(or something Rx like a PublishSubject) which your fragment can listen to like interface YourInterface{ val yourData : MutableLiveData<YourDataType> } in your fragment you will get an instance of YourInterface from the context in onAttach override fun onAttach(context: Context) { super.onAttach(context) val yourInterfaceInstance = context as YourInterface } } you can listen to udates on yourData once you have the yourInterfaceInstance like suppose in onViewCreated of the fragment like yourInterfaceInstance.yourData.observe(this, Ovserver{}) where you can listen in on updates from your Activity wherr you can just pass data by setting the value to yourData like yourData.value = data
google 2
stackoverflow 2