search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

1 answers
Q&A android - Problem with device recording in the background

0

In the project, the device needs to be able to record in the background, but once the app enters the background, the surfaceview will be destroyed. Open the app again and the surfaceview will be re-created. You must execute camera.stopPreview and camera.starPreview in the surfaceCreated() method, otherwise it will The screen will go black. The problem is that if you do this, the recorded video file cannot be played because the camera performs a stopPreview operation in the middle.
Can someone give me some ideas to solve this problem?

Your Answer
submit

1 answers
0

Well, it is recommended to use FloatingWindow to achieve the goal of "background recording". Try to hang this surfaceView on the floating window, maximize the floating window when previewing the interface, and once the user exits the application and enters background mode, set the floating window to the size It is a 1-pixel window, and the recording is still running at this time. There is no need to switch the camera state. Naturally, the recorded files will not be sliced.
I don’t know whether this application runs on the phone or on the car device?

2017-07-06 10:38:46

submit

Popular tool

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use