I
I
Igor2015-08-13 09:38:52
Android
Igor, 2015-08-13 09:38:52

How to play audio from the network and save to a file at the same time?

I play an mp3 file located on the server using MediaPlayer, everything is ok, but I still need to write to a local file so that I can play it if there is no connection.
How to do it on Android?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arman, 2015-08-13
@Arik

Can download to a local file and give the player a local file, how much has already been downloaded?

O
one pavel, 2015-08-13
@onepavel

1. the simplest, open two streams, one downloads, the second plays
2. take a third-party library that can give bytes and play at the same time,
for example BASS

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question