Question

Intent i = new Intent(Intent.ACTION_VIEW);
Uri uriforintent = Uri.parse(uri);
i.setDataAndType(uriforintent, "video/*");
//startActivity(i);
startActivityForResult(i, 0);

The video is a local file playable by Samsung stock vid player if I call startActivity(). It only fails to play with startActivityForResult().

Following errors were logged:

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

Does anyone faces the same issue with Samsung stock video player?

Was it helpful?

Solution

Since ACTION_VIEW is not designed for use with startActivityForResult(), and since you will not actually get a result anyway, just use startActivity().

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top