Hello guys , i would like to know how to create an application that when pressing a button, the android audio producer is automatically activated.
My code:
//The manifest I've already added this:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
boton1.setOnClickListener {
val intent = Intent(Intent.ACTION_VIEW)
val data = Uri.parse("Download:///" + "/audionline.mp3")
intent.setDataAndType(data, "audio/mp3")
startActivity(intent)
}