In Splashscreen Activity inside I implemented the interface. How to send data of interface to multiple Activity in Kotlin?
问题 Interface class: interface MyCustomInterface { fun get_msg( str: String) } SplashScreen Activity: class SplashActivity : AppCompatActivity(),MyCustomInterface { override fun get_msg(str: String) { } val socket=MysocketIO(this) } MySocketIO class where I added the data to interface from server: class MysocketIO(var mainActivity: SplashActivity) : Thread() { fun enable_data_event():Boolean { try { data_event_registered.set(true) socket!!.on(this.data_event_id, object : Emitter.Listener {