I have several tv-boxes, working via wi-fi in different city points - show video ads. To check they are show video correctly, I decide to take screenshots with some interval and compare them. Ok, I take screenshot by this command:
adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png
sometimes I get good screen shot: picture from screen like this
Good screen
but sometimes I get this:
like alpha-channel
Picture from desktop monitor view
I testing one box in office, and it have the same bugs. Videos plays this way:
Intent localIntent = new Intent(getBaseContext(), MediaObjectPlayerActivity.class);
localIntent.putExtra("path", localPath);
localIntent.putExtra("name", mCurrentPlay);
localIntent.setFlags(FLAG_ACTIVITY_NEW_TASK);
startActivity(localIntent);
What can be wrong ? What is anomaly behavior ? Thx.
So, if you want to catch screenshot of video from VideoView, you need to use MediaMetadataRetriever. Here is good example http://android-er.blogspot.ru/2016/04/capture-frames-in-videoview-using.html