[英]app was not working in some of devices
I developed one application. 我开发了一个应用程序。 My application includes video recording and playing. 我的应用程序包括视频录制和播放。
I have to play video what i have recorded from mobile. 我必须播放从手机录制的视频。 This is working in most of devices (Samsung galaxy ace,Motorola Droid x, etc.,)
and not working in some of devices (Droid x2,Nexus,etc.,)
. 这适用于大多数设备(Samsung galaxy ace,Motorola Droid x, etc.,)
,而不适用于某些设备(Droid x2,Nexus,etc.,)
。
i used below code for video playing 我使用以下代码进行视频播放
String temp_path=Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)+"/MySaveCellData/dbz_115.3gp";
//Toast.makeText(this,getSaveCellPath(),Toast.LENGTH_LONG).show();
if(temp_path!=null) {
//int width = myView.getMeasuredWidth();
// int height = myView.getMeasuredHeight();
//we add 10 pixels to the current size of the video view every time you touch
//the media controller.
Display display = getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(myView);
myView.setMediaController(mediaController);
myView.setKeepScreenOn(true);
//myView.setVideoAspect(width,height);
//myView.setVideo
myView.setVideoPath(temp_path);
myView.start();
myView.requestFocus();
}
else
Toast.makeText(this,"Video Path Not Found, or is set to null",Toast.LENGTH_LONG).show();
}
can anyone tell me what is the problem and solution also. 谁能告诉我问题和解决方案。
Thanks in advance. 提前致谢。
Best Regards. 最好的祝福。
The problem is not in video playing.The problem in video recording.When i record the video the hardware of device is not supporting to my code. 问题不在于视频播放。视频录制中的问题。当我录制视频时,设备的硬件不支持我的代码。 So i changed the code of video recorder. 所以我更改了录像机的代码。 It is working well in all devices. 它在所有设备上都运行良好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.