android-camera

Video capture with background audio on Android

拜拜、爱过 提交于 2020-01-17 05:19:08
问题 I am trying to create an app which record videos by playing a background music. The expected output will be the captured video with the above mentioned music. I am not sure whether it is an rubbish question but, anyone please suggest an idea to capture video with a background audio on Android? 回答1: my solution is fine, try it: Service android: import java.util.Calendar; import android.app.Service; import android.content.Context; import android.content.Intent; import android.graphics

Android canvas draw line on camera

ⅰ亾dé卋堺 提交于 2020-01-16 00:38:15
问题 I'm working with augmented reality app and I want to draw a line that connects two movable objects on top of the camera. However I get this exception Process: test.job.reality.augument.job.com.augumentrealitytest, PID: 15056 java.lang.IllegalArgumentException at android.view.Surface.nativeLockCanvas(Native Method) at android.view.Surface.lockCanvas(Surface.java:266) at custom.MyCameraView$MyThread.run(MyCameraView.java:447) Here's my code as you can see I start my thread in surfaceCreted

Can I get the orientation of a photo taken in my app if I limit the activity's orientation to portrait only in my manifest?

爷,独闯天下 提交于 2020-01-15 08:46:28
问题 I don't want to support landscape UI at all across my app, but I want to be able to automatically rotate the photos users take in landscape mode. Currently if a user takes a photo in landscape mode, it remains on screen as if it was taken in portrait (the horizon in the photo is vertical). I've tried to get the orientation from the system like this: val display = (getSystemService(Context.WINDOW_SERVICE) as WindowManager).defaultDisplay val screenOrientation = display.rotation Log.d(

Can I get the orientation of a photo taken in my app if I limit the activity's orientation to portrait only in my manifest?

独自空忆成欢 提交于 2020-01-15 08:46:10
问题 I don't want to support landscape UI at all across my app, but I want to be able to automatically rotate the photos users take in landscape mode. Currently if a user takes a photo in landscape mode, it remains on screen as if it was taken in portrait (the horizon in the photo is vertical). I've tried to get the orientation from the system like this: val display = (getSystemService(Context.WINDOW_SERVICE) as WindowManager).defaultDisplay val screenOrientation = display.rotation Log.d(

Camera.takePicture throws RunTimeException

这一生的挚爱 提交于 2020-01-15 04:51:19
问题 I know this question has been asked many times but none of the answers has solved my question. In my app, I have used service which takes picture without preview in a background. My app works fine on most of the Android phones like Samsung Galaxy S2, Samsung Grand but when I tested on Sony Experia M 4.1.2 and Samsung Galaxy Core Duos 4.1.2, it throws runtime exception at myCamera.takePicture. I have followed many links on stackoverflow but couldnt find solution: app passed NULL surface, while

compile ICS/JB camera application - native library jni-mosaic error

核能气质少年 提交于 2020-01-14 14:19:48
问题 I would like to use the Panorama mode that the ICS/JB camera application has. I've downloaded the source code (with resources) and managed to solve all code compilation errors but as soon as I start the application on my device (running JB), I get this error: 10-25 14:42:53.617: E/AndroidRuntime(23147): FATAL EXCEPTION: GLThread 2586 10-25 14:42:53.617: E/AndroidRuntime(23147): java.lang.UnsatisfiedLinkError: Native method not found: com.app.camera.panorama.MosaicRenderer.reset:(IIZ)V 10-25

Takes long time to open in custom camera android?

你。 提交于 2020-01-14 14:11:51
问题 Hi I am working in custom camera. I used CameraPreview class from git. Everything works fine but problem is when i open camera from Activity A, it takes 4 seconds to open the camera. I am not getting any error. But getCameraInstance method calling takes long time to open the camera. How to reduce 4 seconds delay when opening the camera? I have clueless how to reduce the delay to go to TakePhotoFragment. Please help me to solve the issue Here is CameraPreview: public class CameraPreview

Android Auto focus doesn't work after creating camera view

…衆ロ難τιáo~ 提交于 2020-01-14 08:12:30
问题 I am trying to create my own Camera View, I have everything working except the autofocus, I can't seem to figure out why it won't work. Here is my code for CameraView.java public class CameraView extends SurfaceView implements SurfaceHolder.Callback { private SurfaceHolder surface_Holder; private Camera main_Camera; boolean on; public CameraView(Context context, Camera camera){ super(context); main_Camera = camera; main_Camera.setDisplayOrientation(90); surface_Holder = getHolder(); surface

Can't see virtual scene images in emulator camera app

亡梦爱人 提交于 2020-01-14 07:54:27
问题 I'm using the Android Emulator (version 28.0.23-5264690) to develop an app that uses QR codes. The Virtual Scene feature for the camera on the emulator has an option to add your own images to the scene: When using the emulator with a camera app, you can import an image in PNG or JPEG format to be used within a virtual scene. To choose an image for use in a virtual scene, click Add image in the Camera -> Virtual scene images tab in the Extended controls dialog. This feature can be used to

MLKit Firebase android - How to convert FirebaseVisionFace to Image Object (like Bitmap)?

☆樱花仙子☆ 提交于 2020-01-14 07:43:07
问题 I have integrated MLkit FaceDetection into my android application. I have referred below URL https://firebase.google.com/docs/ml-kit/android/detect-faces Code for Face Detection Processor Class is import java.io.IOException; import java.util.List; /** Face Detector Demo. */ public class FaceDetectionProcessor extends VisionProcessorBase<List<FirebaseVisionFace>> { private static final String TAG = "FaceDetectionProcessor"; private final FirebaseVisionFaceDetector detector; public