android-camera

The Camera Intent is simply not working

早过忘川 提交于 2019-12-25 09:00:41
问题 public class CameraintentActivity extends Activity { String _path, sliderpather; Button button; Intent intent; Uri outputFileUri; File file; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button = (Button)findViewById(R.id.button1); _path = Environment.getExternalStorageDirectory().getName() + File.separatorChar + "make_machine_example.jpg"; file = new File( _path

Lock camera / screen orientation to landscape with Ionic / ngCordova

与世无争的帅哥 提交于 2019-12-25 04:45:15
问题 I am trying to lock camera orientation to portrait in the app and to landscape in the camera. For camera access I am using $cordovaCapture pluggin. For orientation cordova-plugin-screen-orientation. Both plugins work but orientation plugin doesn't affect camera. (Testing in an Android) screen.lockOrientation('portrait'); $scope.captureVideo = function() { var options = { limit: 1, duration: 15 }; screen.lockOrientation('landscape'); $cordovaCapture.captureVideo(options) .then(function

App camera crash

a 夏天 提交于 2019-12-25 04:08:30
问题 I use the next tutorial, in developer.android.com : http://developer.android.com/training/camera/photobasics.html with API 2.1 When I click in take a small picture, no problem When I click in take a small picture and after I click in take a big picture, no problem But, when I click directly in big picture, I take a picture and my app crash ... In LogCat : 05-10 09:26:30.773: D/CameraSample(3407): failed to create directory 05-10 09:26:33.713: W/IInputConnectionWrapper(3407): showStatusIcon on

Preview image from the camera is stretched

谁说胖子不能爱 提交于 2019-12-25 04:07:39
问题 I have an Android app that opens the camera, starts preview and streams it on screen. Important note: there is no real SurfaceView associated with the camera. There's only a dummy SurfaceTexture : m_previewTexture = new SurfaceTexture(58346); camera.setPreviewTexture(m_previewTexture); Now, I'm getting the image using the Camera.PreviewCallback . It is irrelevant what I'm doing with it further. So far I'm displaying it on the screen, but I might as well be saving it on the memory card. Now,

Issue in capture image using camera in lollipop

倾然丶 夕夏残阳落幕 提交于 2019-12-25 03:36:28
问题 I have been searching for the following issue for three days My Code is as following private void openCamera () { try { Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); String fileName = Constants.IMAGE_CAPTURE_FILE_NAME_PREFIX + System.currentTimeMillis() + Constants.IMAGE_FILE_EXT_JPG; mImageFile = new File(FileManager.getInstance().getFileFullName(Constants.IMAGE_FOLDER, fileName)); captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, mImageFile); startActivityForResult

Issue in capture image using camera in lollipop

删除回忆录丶 提交于 2019-12-25 03:36:05
问题 I have been searching for the following issue for three days My Code is as following private void openCamera () { try { Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); String fileName = Constants.IMAGE_CAPTURE_FILE_NAME_PREFIX + System.currentTimeMillis() + Constants.IMAGE_FILE_EXT_JPG; mImageFile = new File(FileManager.getInstance().getFileFullName(Constants.IMAGE_FOLDER, fileName)); captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, mImageFile); startActivityForResult

How to manipulate on the fly YUV Camera frame efficiently in Android?

拟墨画扇 提交于 2019-12-25 03:35:07
问题 I'm adding a black (0) padding around Region of interest (center) of NV21 frame got from Android CameraPreview callbacks in a thread. To avoid overhead of conversion to RGB/Bitmap and reverse, I'm trying to manipulate NV21 byte array directly but this involves nested loops which is also making preview/processing slow. This is my run() method sending frames to detector after calling method blackNonROI . public void run() { Frame outputFrame; ByteBuffer data; while (true) { synchronized (mLock)

Renderscript ScriptIntrinsicYuvToRGB and Bitmap allocation

旧巷老猫 提交于 2019-12-25 03:34:25
问题 I want to make my own SurfaceView and send there a frames which I've obtained from onPreviewFrame(byte[] data, Camera camera) method. To do it, I need to conver frames from Yuv to ARGB and to draw them to a Canvas to my SurfaceView. Here is my onPreviewFrame: public void onPreviewFrame(byte[] data, Camera camera) { if (camera != null) { camera.addCallbackBuffer(data); } // using RenderScript Bitmap bitmap = RenderScriptFilter.convertYuvToRgbIntrinsic(rs, data, PREVIEW_WIDTH, PREVIEW_HEIGHT);

How to Take a Photo with the Camera App And also save as thumbnail and as Full-size Photo (resize & crop customly) in SD Card Two Folders?

前提是你 提交于 2019-12-25 02:47:15
问题 I am new in android development. I want take an image from android camera tool then save as thumbnail and also save as Full-size (Resize & crop user defined). I actually want thumbnail image show in GridView from one folder of SD Card then click one image then show full-size(1536 X 2048) image in one window from another folder of SD Card. I search in google but not get absolute example or tutorial which is match two conditions. For example developer.android.com/training/camera/photobasics

How to Take a Photo with the Camera App And also save as thumbnail and as Full-size Photo (resize & crop customly) in SD Card Two Folders?

蓝咒 提交于 2019-12-25 02:47:02
问题 I am new in android development. I want take an image from android camera tool then save as thumbnail and also save as Full-size (Resize & crop user defined). I actually want thumbnail image show in GridView from one folder of SD Card then click one image then show full-size(1536 X 2048) image in one window from another folder of SD Card. I search in google but not get absolute example or tutorial which is match two conditions. For example developer.android.com/training/camera/photobasics