Controlando el reproductor de música de Android con mi propia aplicación
Frecuentes
Visto 1,787 veces
0
I want to write some application to control android music player :) For example when i shake phone -> player should change music next one. Is it possible without rooting my phone?
2 Respuestas
0
I think it is possible, here is a snippet for a performing playback through Intent
.
Intent intent = new Intent(MediaStore.INTENT_ACTION_MUSIC_PLAYER);
startActivity(intent);
or
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
File file = new File(YOUR_SONG_URI);
intent.setDataAndType(Uri.fromFile(file), "audio/*");
startActivity(intent);
Fuente: Android iniciando el reproductor de música usando intent
You have to check if there are more Intents you can use by googleing (loading a playlist, etc.).
contestado el 23 de mayo de 17 a las 12:05
0
To control any 3rd party application it first have to be willing to let you to. It is usually done by exposing public API of any sort, so other app would know how to do that. If music player of your choice offers that, then "yes" is the answer. If it does not, then usually it means "no", and rooting is not necessarily a magical solution either. If there's no API or any other communication channel exposed (even non publicly) then achieving your goal would be tricky.
Respondido 25 ago 12, 12:08
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas android api controls audio-player android-music-player or haz tu propia pregunta.
Note, this is far from "controlling music application" in terms of OP's question - Marcin Orlowski
the OP has an idea and seeks for solutions. I am entirely not sure if "control" is meant literally. - schrass
See this portion of his question "player should change music next one", which I assume referes to playlist entry. - Marcin Orlowski