I currently have an app that records a video and uploads it to my server. after uploading the video, the app gets a response that holds a URL to the flv stream to the file.
when I try to open the stream in the android default video player (Videos) nothing happens, but when I used a different app (BSPlayer), it played the video perfectly. however, there is no way to force opening one app from Intent.ACTION_VIEW
. here is the code for the function that receives the response from the server:
@Override
protected void onResponseReceived(int requestType, int status, Object resp) {
switch (requestType) {
case CLIP_DETAILS: {
if (status == RESPONSE_OK) {
String token1 = ((ResponseObject_ClipDetails) resp).m_token1;
String token2 = ((ResponseObject_ClipDetails) resp).m_token2;
String url = getClipURL(token1, token2);
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
i.setType("video/flv");
startActivity(i);
}
}
break;
}
}
is there a way to show .flv videos in my android app?