<i tried to start a service ( playing music) from ...
# stackoverflow
u
i tried to start a service ( playing music) from an activity but it is not working at all can anyone i am using kotlin below is my code i tried to start a service ( playing music) from an activity but it is not working at all can anyone i am using kotlin below is my code noting the service already added in the manifest file class MyService : Service() { lateinit var mediaPlayer:MediaPlayer override fun onCreate() { super.onCreate() Log.i("Service","service Created") mediaPlayer=MediaPlayer.create(this,R.raw.music2) } override fun onDestroy() { super.onDestroy() Log.i("Service","service Destroyed")...