PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
WM - Tocar, executar um arquivo MP3 via java no projeto Android do Windev Mobile (Play Mp3 in project Android with Windev Mobile)
WM - Tocar, executar um arquivo MP3 via java no projeto Android do Windev Mobile (Play Mp3 in project Android with Windev Mobile)
Started by adrianoboller, Feb., 27 2016 1:46 AM - 1 reply
Connect yourself…
adrianoboller
#1
Registered member
3,651 messages
Popularité : +175 (223 votes)
Posted on February, 27 2016 - 1:46 AM
Prezados,
Segue exemplo de como tocar, executar um arquivo MP3 via java no projeto Android do Windev Mobile (Play Mp3 in project Android with Windev Mobile:
//CODE JAVA IN WINDEV MOBILE
import android.media.MediaPlayer
;
PUBLIC static
void ExecMp3
(
string
filePath
)
{
try
{
MediaPlayer mediaPlayer
=
new
MediaPlayer
(
)
;
mediaPlayer.setDataSource
(
filePath
)
;
mediaPlayer.prepare
(
)
;
mediaPlayer.start
(
)
;
}
catch
(
EXCEPTION
ex
) {
}
}
Use em um botão:
ExecMp3
(
"arquivo.mp3"
)
Bons estudos!
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.blogspot.com.br/
Report
0
0
andregim
#2
Posted on May, 09 2020 - 2:53 PM
oi adriano
Seu código java para reproduzir um arquivo mp3 é perfeito.
No seu exemplo, o nome do arquivo mp3 é passado no procedimento, mas agora você pode me ajudar, porque estou procurando acessar o diretório de músicas para ter a lista de arquivos mp3 no telefone, para escolher um arquivo da lista.
obrigado
André
Report
0
0
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text