No puedo reproducir videos en el reproductor estándar de Samsung
-
26-12-2019 - |
Pregunta
Intent i = new Intent(Intent.ACTION_VIEW);
Uri uriforintent = Uri.parse(uri);
i.setDataAndType(uriforintent, "video/*");
//startActivity(i);
startActivityForResult(i, 0);
El vídeo es un archivo local. interpretable por el reproductor de video stock Samsung si llamo Iniciar actividad().Sólo falla al jugar con iniciarActividadParaResultado().
Se registraron los siguientes errores:
06-02 19:07:12.742: E/MediaPlayer(23993): Error (1,-2147483648)
06-02 19:07:12.742: E/MoviePlaybackService(23993): TouchPlayer :: mErrorListener = 1<<<<<<<<<<<<
06-02 19:07:12.742: D/MoviePlayer(23993): onSvcNotification - action : 104
06-02 19:07:12.742: E/MoviePlayer(23993): createErrorDialog(action, intent). action = 104
¿Alguien enfrenta el mismo problema con Reproductor de vídeo Samsung?
Solución
Desde ACTION_VIEW
no está diseñado para usarse con startActivityForResult()
, y como de todos modos no obtendrás un resultado, simplemente usa startActivity()
.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow