CN104980660A - Method for mute shooting on Android platform - Google Patents
Method for mute shooting on Android platform Download PDFInfo
- Publication number
- CN104980660A CN104980660A CN201510402820.8A CN201510402820A CN104980660A CN 104980660 A CN104980660 A CN 104980660A CN 201510402820 A CN201510402820 A CN 201510402820A CN 104980660 A CN104980660 A CN 104980660A
- Authority
- CN
- China
- Prior art keywords
- data
- preview
- taking pictures
- finding
- preview frame
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Studio Devices (AREA)
Abstract
The invention relates to the technical field of shooting on the Android platform, and provides a method for mute shooting on the Android platform. The method includes starting the camera function of an Android device, starting the preview, registering preview frame recall, obtaining the preview frame data, determining whether or not a user triggers a shooting operation, if no, returning to the previous step, if yes, continuing the operation, cancelling the preview frame recall, stopping the preview, converting the preview frame data into photograph data, and storing the photograph data to obtain the photograph. The method thoroughly solves the problem of eliminating warning tone during shooting, and is applicable to all Android devices.
Description
Technical field
The present invention relates to Android platform shooting technology field, particularly relating to the method how hiding the prompt tone of taking pictures that system sends when taking pictures.
Technical background
Using in the scene of mobile phone photograph at present, have under a lot of scene to reach the object of candid photograph, need to complete photographic process when letting alone and being taken target, but due to the restriction of android system, the Shi Junhui that different mobile phone carries out take pictures sends prompt tone of taking pictures, more existing technical schemes can prompt tone of taking pictures on hidden parts mobile phone when taking pictures at present, but cannot come into force on all mobile phones.
Traditional Android phone is taken pictures process, takePicture method is used to carry out process of taking pictures, when being taken pictures by takePicture method, android system can search/system/media/audio/ui catalogue under prompt tone file of taking pictures play, because this catalogue belongs to the catalogue of system level, the broadcasting of system for this file cannot be forbidden by the amendment of application program.
In prior art, there is the alter mode of some applications can carry out some to the problem of traditional scheme and improve:
Call takePicture method and need transmission parameter ShutterCallback, the processing procedure of this Parametric Representation when mobile phone photograph shutter is triggered, here by being empty by this optimum configurations, the effect of taking pictures without prompt tone can be reached like this on part type;
The prompt tone of taking pictures of part type equally also can control by system sound volume, and system sound volume in android system be can be employed programme controlled, therefore before takePicture, mobile phone can be adjusted to silent mode, then after getting photo, recover original volume pattern, reach quiet object of taking pictures with this;
By carrying out Root operation (obtain Administrator Level authority) to Android phone, delete/system/media/audio/ui under corresponding audio files of taking pictures, like this when taking pictures because audio files does not exist, also can reach quiet effect of taking pictures.
Above-mentioned three kinds of methods can reach the effect eliminating prompt tone of taking pictures on part type, but still there is part type to address this problem, the mode being obtained photo by takePicture perfectly cannot eliminate prompt tone of taking pictures, just because of this, find a kind of the take pictures method of prompt tone of thorough solution and there is important theory and realistic meaning.
Summary of the invention
On basis for the shortcoming of prior art, the object of the present invention is to provide a kind of quiet method of taking pictures of Android platform, thoroughly solve the elimination problem of prompt tone of taking pictures, and can be used for all Android types to hide prompt tone of taking pictures.
The invention provides a kind of quiet method of taking pictures of Android platform, mainly comprise following step:
(1) camera function of Android device is started;
(2) preview is started;
(3) preview frame readjustment is registered;
(4) preview frame data are obtained;
(5) judge whether user triggers photographing operation, if "No", return step, if "Yes", continue;
(6) preview frame readjustment is cancelled;
(7) preview is stopped;
(8) be picture data by preview frame data transformations;
(9) preserve picture data acquisition taken a picture.
Further, in step (3), make camera after the data getting each frame all by onPreviewFrame method, preview frame data are returned application program.
Further, preview frame data format is yuv format.
Further, in step (4) and step (5), two step cycle are carried out;
Along with change of finding a view, phase chance ceaselessly returns to application program by onPreviewFrame method data of finding a view;
Application program needs to judge whether active user triggers photographing operation, if do not trigger photographing operation, the data of finding a view of current acquisition can directly abandon by application program, and return step (4), if trigger photographing operation, proceed photo disposal.
Further, in step (6) and step (7), camera is made no longer to return any data of finding a view to application program by these two steps, consistent with the picture of finding a view that user finally sees at interface of finding a view to ensure the photo preserved.
Further, in step (8), the YUVImage class provided by android system carries out the conversion of preview frame data yuv format to picture data jpeg format.
The inventive method be using the preview frame data of middle acquisition of finding a view based on last picture data.In the process of finding a view, phase chance ceaselessly returns data of finding a view, therefore, when user presses shutter, only need time-outs of finding a view moment at that time, while obtain last frame immediately image be converted into jpeg image format and carry out preservation and can obtain photo of taking pictures.This shooting style does not need, by takePicture method, therefore can walk around system constraint, the prompt tone of taking pictures that no longer automatic playing system presets, and wants the prompt tone that sends when can be defined in and be taken pictures by developer oneself.Therefore, it is possible to effectively solve the elimination problem sending prompt tone when taking pictures, and be applicable to all Android platform.
After reading the detailed description of embodiment of the present invention by reference to the accompanying drawings, the other features and advantages of the invention will become clearly.
Accompanying drawing explanation
Below in conjunction with accompanying drawing and embodiment, the present invention is further detailed explanation:
Fig. 1 is of the present invention for the quiet method flow diagram of taking pictures of Android platform.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearly, will be described in further detail the specific embodiment of the present invention below.
See Fig. 1, the present embodiment be applicable to the quiet method of taking pictures of Android platform, comprise following step:
(1) camera function of Android device is started;
In the present embodiment, user is when pressing the camera function of Android device, and this equipment enters the state of taking pictures.
(2) preview is started;
In the present embodiment, the preview of camera view interface is utilized to find a view picture.
(3) preview frame readjustment is registered;
Make camera after the data getting each frame all by onPreviewFrame method, preview frame data are returned application program;
Wherein preview frame data format is yuv format;
OnPreviewFrame method is exactly the callback method obtaining yuv format data, by in the application program of the camera of Android platform, by by being set using call back function setPreviewCallback to realize calling onPreviewFrame interface, thus the data obtaining each frame form preview frame data returns to application program.
(4) preview frame data are obtained;
Along with change of finding a view, phase chance ceaselessly returns to application program by onPreviewFrame method data of finding a view.
(5) judge whether user triggers photographing operation, if "No", return step, if "Yes", continue;
Application program needs to judge whether active user triggers photographing operation, if do not trigger photographing operation, the data of finding a view of current acquisition can directly abandon by application program, return step (4), if trigger photographing operation, proceed photo disposal.
(6) preview frame readjustment is cancelled;
(7) preview is stopped;
Camera is made no longer to return any data of finding a view to application program by step (6) and step (7), consistent with the picture of finding a view that user finally sees at interface of finding a view to ensure the photo preserved.
(8) be picture data by preview frame data transformations;
The YUVImage class provided by android system carries out the conversion of preview frame data yuv format to picture data jpeg format;
By YUVImage class, byte data is configured to YUVImage object, then calls compress To Jpeg () of YUVImage object, obtain JPEG picture.
(9) preserve picture data acquisition taken a picture.
What finally illustrate is, above embodiment is only in order to illustrate technical scheme of the present invention and unrestricted, although with reference to preferred embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that, can modify to technical scheme of the present invention or equivalent replacement, and not departing from aim and the scope of technical solution of the present invention, it all should be encompassed in the middle of right of the present invention.
Claims (6)
1. the quiet method of taking pictures of Android platform, is characterized in that comprising following step:
(1) camera function of Android device is started;
(2) preview is started;
(3) preview frame readjustment is registered;
(4) preview frame data are obtained;
(5 judge whether user triggers photographing operation, if "No", return step, if "Yes", continue;
(6) preview frame readjustment is cancelled;
(7) preview is stopped;
(8) be picture data by preview frame data transformations;
(9) preserve picture data acquisition taken a picture.
2. a kind of quiet method of taking pictures of Android platform according to claim 1, it is characterized in that, in step (3), make camera after the data getting each frame all by onPreviewFrame method, preview frame data are returned application program.
3. a kind of quiet method of taking pictures of Android platform according to claim 2, it is characterized in that, preview frame data format is yuv format.
4. a kind of quiet method of taking pictures of Android platform according to claim 1 and 2, is characterized in that, in step (4) and step (5), two step cycle are carried out;
Along with change of finding a view, phase chance ceaselessly returns to application program by onPreviewFrame method data of finding a view;
Application program needs to judge whether active user triggers photographing operation, if do not trigger photographing operation, the data of finding a view of current acquisition can directly abandon by application program, and return step (4), if trigger photographing operation, then proceed photo disposal.
5. a kind of quiet method of taking pictures of Android platform according to claim 1, it is characterized in that, in step (6) and step (7), camera is made no longer to return any data of finding a view to application program, consistent with the picture of finding a view that user finally sees at interface of finding a view to ensure the photo preserved.
6. a kind of quiet method of taking pictures of Android platform according to claim 1 and 3, it is characterized in that, in step (8), the YUVImage class provided by android system carries out the conversion of preview frame data yuv format to picture data jpeg format.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510402820.8A CN104980660B (en) | 2015-07-10 | 2015-07-10 | A kind of mute method taken pictures of Android platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510402820.8A CN104980660B (en) | 2015-07-10 | 2015-07-10 | A kind of mute method taken pictures of Android platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104980660A true CN104980660A (en) | 2015-10-14 |
CN104980660B CN104980660B (en) | 2019-01-04 |
Family
ID=54276711
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510402820.8A Active CN104980660B (en) | 2015-07-10 | 2015-07-10 | A kind of mute method taken pictures of Android platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104980660B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105472259A (en) * | 2016-01-21 | 2016-04-06 | 腾讯科技(深圳)有限公司 | Image processing method and device, and terminal |
CN105933597A (en) * | 2016-04-19 | 2016-09-07 | 乐视控股(北京)有限公司 | Prompting method of terminal and terminal |
CN106603910A (en) * | 2016-11-28 | 2017-04-26 | 上海传英信息技术有限公司 | Photo saving method based on intelligent terminal |
CN109068059A (en) * | 2018-08-27 | 2018-12-21 | Oppo广东移动通信有限公司 | A kind of method, mobile terminal and storage medium calling camera |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103544221A (en) * | 2013-09-30 | 2014-01-29 | Tcl集团股份有限公司 | Method and system for generating video thumbnail in Android system |
CN103716535A (en) * | 2013-12-12 | 2014-04-09 | 乐视致新电子科技(天津)有限公司 | Method for switching photographing mode, and electronic device |
-
2015
- 2015-07-10 CN CN201510402820.8A patent/CN104980660B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103544221A (en) * | 2013-09-30 | 2014-01-29 | Tcl集团股份有限公司 | Method and system for generating video thumbnail in Android system |
CN103716535A (en) * | 2013-12-12 | 2014-04-09 | 乐视致新电子科技(天津)有限公司 | Method for switching photographing mode, and electronic device |
Non-Patent Citations (1)
Title |
---|
李松柏,尚海: "基于计算机摄像头的图像采集和变换的设计", 《计量与测试技术》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105472259A (en) * | 2016-01-21 | 2016-04-06 | 腾讯科技(深圳)有限公司 | Image processing method and device, and terminal |
CN105933597A (en) * | 2016-04-19 | 2016-09-07 | 乐视控股(北京)有限公司 | Prompting method of terminal and terminal |
CN106603910A (en) * | 2016-11-28 | 2017-04-26 | 上海传英信息技术有限公司 | Photo saving method based on intelligent terminal |
CN106603910B (en) * | 2016-11-28 | 2020-09-04 | 上海传英信息技术有限公司 | Photo storage method based on intelligent terminal |
CN109068059A (en) * | 2018-08-27 | 2018-12-21 | Oppo广东移动通信有限公司 | A kind of method, mobile terminal and storage medium calling camera |
Also Published As
Publication number | Publication date |
---|---|
CN104980660B (en) | 2019-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101790679B1 (en) | Mobile terminal and method for starting shooting on mobile terminal | |
CN103152489B (en) | A kind of exhibiting method of image of autodyning and device | |
WO2017096857A1 (en) | Method and device for adjusting photographing parameter of camera | |
KR101949832B1 (en) | Picture displaying method, apparatus and terminal device | |
CN104980660A (en) | Method for mute shooting on Android platform | |
US20170163878A1 (en) | Method and electronic device for adjusting shooting parameters of camera | |
WO2020233136A1 (en) | Television-based automatic photo taking method, television, and storage medium | |
CN101548232A (en) | Method and system for providing background blurring when capturing an image using an image capture device | |
KR101528216B1 (en) | Photographing processing method and terminal device | |
JP6333990B2 (en) | Panorama photo generation method and apparatus | |
AU2011253977B2 (en) | Method, system and apparatus for selecting an image captured on an image capture device | |
CN103927165A (en) | Wallpaper picture processing method and device | |
CN104918112B (en) | The application process and device of camera resource | |
CN105718160A (en) | Application operation triggering method, apparatus and system | |
CN111461950B (en) | Image processing method and device | |
CN107155062B (en) | Record the photographic method and device, mobile terminal of acoustic information | |
JP6679409B2 (en) | Imaging device, remote control device, control method and program, and storage medium | |
CN105450922A (en) | Shooting processing method and device | |
JP2010193265A (en) | Information processing device, and method for processing information | |
CN106503133B (en) | Cloud disk data processing method and device | |
CN112887799B (en) | Image resource sharing method, device and medium | |
CN103024268A (en) | Photographing method based on guides and prompts of sound information | |
CN105453541B (en) | The method of electronic device and control electronic device | |
KR101138604B1 (en) | Camera having voice auto-recognition/search module and voice auto-recognition/search module using the same | |
CN107249022B (en) | Image backup method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP02 | Change in the address of a patent holder | ||
CP02 | Change in the address of a patent holder |
Address after: 610041 the 13 floor of No. 1 middle Tianfu Avenue, No. 1268, high-tech zone, Chengdu, Sichuan. Patentee after: Chengdu PinGuo Digital Entertainment Ltd. Address before: 610041 No. 216 South City Road, Chengdu hi tech Zone, Sichuan Patentee before: Chengdu PinGuo Digital Entertainment Ltd. |