Vote count: 1
I have a question regarding mediaplayer for android app. I would like to play audio files by HTTP streaming acquired from my database.
I already retain the audio file URL by the getStringExtra method.
DetailActivity.java
Intent intent = getIntent();
String audioGuide = intent.getStringExtra("audioGuide");
Could anyone help me how to play "audioGuide" by mediaplayer?
In addition, I want the process will be below;
After tapping audioButton,the audioplayer will start.Then tapped again,the audio will stop. (I'd like to change the playbutton to pause button contained in my drawable.)
activity_detail.xml
<ImageView
android:id="@+id/audioButton"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_gravity="center"
android:onClick="onAudioButton"
android:src="@drawable/play_button"/>
Sorry for if my poor english confuses you. Thank you.
asked 9 mins ago
This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.
Android|Play audio files acquired from my database
Aucun commentaire:
Enregistrer un commentaire