CN108628596A - A kind of kinescope method, device and mobile terminal based on android system - Google Patents

A kind of kinescope method, device and mobile terminal based on android system Download PDF

Info

Publication number
CN108628596A
CN108628596A CN201810362691.8A CN201810362691A CN108628596A CN 108628596 A CN108628596 A CN 108628596A CN 201810362691 A CN201810362691 A CN 201810362691A CN 108628596 A CN108628596 A CN 108628596A
Authority
CN
China
Prior art keywords
activity
service
camera
layouts
machine
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.)
Pending
Application number
CN201810362691.8A
Other languages
Chinese (zh)
Inventor
刘晓敏
潘伟
周春萌
冯坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201810362691.8A priority Critical patent/CN108628596A/en
Publication of CN108628596A publication Critical patent/CN108628596A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)
  • Telephone Function (AREA)

Abstract

The present invention provides a kind of kinescope method, device and mobile terminal based on android system, and this method includes:When Activity is exited, the Service for controlling Camera video recordings of unbundlings and Activity bindings;Camera described in the Service Background controls records a video, and is not impacted to Service to make Activity exit, and Service can continue to control Camera video recordings from the background, meet the real-time recording demand of mobile terminal.

Description

A kind of kinescope method, device and mobile terminal based on android system
Technical field
The present invention relates to field of computer technology more particularly to a kind of kinescope method based on android system, device and Mobile terminal.
Background technology
Video recording is the function that mobile terminal is generally supported, frequency of use is higher and higher in daily life and work.
When user is recorded a video using mobile terminal, other operations are if desired executed, for example, receive and dispatch short message, take phone etc., Video recording can be forcibly stopped.But in some special application scenarios, for example, police service, law enforcement field etc., need uninterrupted real-time Video recording, existing processing mode cannot be satisfied the demand of real-time recording;And police service equipment is longer to requiring cruise duration, it is normal to record a video In due to need keep screen be always on, cause equipment power dissipation larger.
Invention content
The present invention in order to solve the problems, such as existing mobile terminal exit application after can not real-time recording, one kind is provided and is based on The kinescope method, device and mobile terminal of Android (Android) system, to realize the real-time recording of mobile terminal.
For achieving the above object, the present invention provides following technical solutions:
In a first aspect, the present invention provides a kind of kinescope method based on android system, the method includes:
When Activity (activity) is exited, unbundlings are with Activity bindings for controlling Camera (camera) video recordings Service (service);
Camera described in the Service Background controls records a video.
Optionally, before the Activity is exited, further include:
When the Activity starts, the Activity and the Service are bound.
Optionally, before the Activity is exited, further include:
The Service loads the Camera and corresponds to UI (User Interface, user interface) layouts, so that described The corresponding preview interface of UI layouts is shown in the Activity;
After the Service for controlling Camera video recordings that the unbundlings are bound with the Activity, further include:
The Service minimizes the UI layouts, to hide the preview interface.
Optionally,
The Service loads or minimizes the UI by WindowManager (window management) and is laid out.
Second aspect, the present invention provide a kind of recording apparatus based on android system, and described device includes:
Activity is used to control for when the Activity is exited, unbinding with what the Activity was bound The Service of Camera video recordings;
The Service, for Camera video recordings described in Background control.
Optionally,
The Activity is additionally operable to when the Activity starts, and binds the Activity and described Service。
Optionally,
The Service is additionally operable to load the Camera and corresponds to UI layouts, so that the corresponding preview interface of UI layouts It is shown in the Activity;The UI layouts are minimized, to hide the preview interface.
Optionally,
The Service is laid out specifically for loading or minimizing the UI by WindowManager.
The third aspect, the present invention provide a kind of mobile terminal, including Camera, processor and machine readable storage are situated between Matter, the machine readable storage medium are stored with the machine-executable instruction that can be executed by the processor, the processor Promoted by the machine-executable instruction:Realize the above-mentioned kinescope method based on android system.
Fourth aspect, the present invention provide a kind of machine readable storage medium, are stored in the machine readable storage medium Machine-executable instruction, the machine-executable instruction realize the above-mentioned video recording based on android system when being executed by processor Method.
The present invention unbinds when Activity is exited and is used to control with what Activity was bound it can be seen from above description The Service of Camera processed video recording, does not impact Service to make Activity exit, Service can backstage after Continuous control Camera video recordings, meet real-time recording demand.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is existing camera applications process flow;
Fig. 2 is a kind of kinescope method flow chart based on android system shown in the embodiment of the present invention;
Fig. 3 is a kind of camera applications process flow shown in the embodiment of the present invention;
Fig. 4 is a kind of schematic diagram at camera preview interface shown in the embodiment of the present invention;
Fig. 5 is the structural schematic diagram of the mobile terminal shown in the embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of video recording logic based on android system shown in the embodiment of the present invention.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent and the consistent all embodiments of the present invention.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects being described in detail in claims, of the invention.
It is the purpose only merely for description specific embodiment in terminology used in the present invention, is not intended to limit the invention. It is also intended to including majority in the present invention and "an" of singulative used in the attached claims, " described " and "the" Form, unless context clearly shows that other meanings.It is also understood that term "and/or" used herein refers to and wraps Containing one or more associated list items purposes, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the present invention A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, not departing from In the case of the scope of the invention, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determination ".
User clicks the application icon on mobile terminal desktop, that is, starts this and apply corresponding Activity, pass through Activity can provide the interface to interact with the application to the user, and receive user's operation.
It is existing camera applications process flow referring to Fig. 1 by taking camera applications as an example:
Step 101, camera applications icon is clicked, the corresponding Activity of camera applications is started;
Step 102, Activity loads camera and corresponds to UI topology files;
Step 103, Activity starts camera Camera;
Step 104, Activity shows that UI is laid out corresponding preview interface;
Step 105, user can start video recording (running) by operating the button in preview interface;
Step 106, in video process, if receiving and dispatching short message or taking phone (starting short message application or phone application), Activity closes camera;
Step 107, Activity destroys UI layouts;
Step 108, the corresponding Activity of camera applications is exited.
As it can be seen that the prior art is by Activity control camera video recordings and interface display, when Activity is exited, camera It closes, can not continue to record a video.But in some feature application scenarios, for example, law enforcement field, needs uninterrupted sampling image (real When record a video), and existing processing mode cannot be satisfied real-time recording demand.
In view of the above-mentioned problems, the present invention provides a kind of kinescope method based on android system, referring to Fig. 2, for the present invention Implement a kind of flow chart of the kinescope method based on android system exemplified, which is described video process.
Step 201, when Activity is exited, unbundlings are with Activity bindings for controlling Camera video recordings Service。
The present invention controls Camera using the Service components of android system.
When Activity starts, Activity and Service is bound, so that Activity is passed through Service and uses camera Video recording;When exiting Activity, Activity and Service is unbinded, exiting for Activity is made not influence Service to phase The control of machine.
Step 202, Camera described in the Service Background controls records a video.
Since Service components have running background characteristic, after by step 201 and Activity unbundlings, Service can Background control Camera video recording, meet the real-time recording demand of mobile terminal.
Further, since Service classes do not have UI to show, also not generating UI with user interacts, in order to start in Activity When show camera preview interface, Service utilizes the WindowManager (common class of Android) of android system The corresponding UI layouts of Camera are loaded, so that the corresponding preview interface of UI layouts can be shown in Activity.As the Activity When exiting, Service minimizes UI layouts (for example, setting UI sizes are 1 × 1 pixel using WindowManager again Point) so that after current Activity is exited, do not influence the display of the Activity newly started.
It should be added that after being exited due to Activity, the Camera video recordings of Service Background controls are no longer aobvious Show camera preview interface, therefore, mobile terminal can go out screen, and to reduce electric quantity consumption, extend mobile terminal uses duration.
Now with a specific embodiment, the video process based on android system is discussed in detail.
It is a kind of camera applications process flow shown in the embodiment of the present invention referring to Fig. 3 still by taking camera applications as an example:
Step 301, user clicks the camera applications icon for being installed on mobile terminal desktop, and it is corresponding to start camera applications Activity;
Step 302, start Service, the i.e. CameraService for controlling camera (Camera) video recording, it should CameraService can be controlled by Activity to be started, also can be by other startup events (for example, physical button, touch event Deng) triggering, it controls CameraService and pre-actuates;
Step 303, in the onbind () of CameraService, Surface is completed by initSurface () and (is drawn Cloth) establishment, pass through addView () complete View (camera corresponds to UI topology files) load;
Wherein, addView () realizes that user only needs will be designed using the WindowManager of android system UI topology files (including each control information, for example, the position of button, picture, file, size, color etc.) are transmitted as parameter To WindowManager.
Step 304, CameraService controls camera and starts;
Step 305, CameraService controls UI by showWindow () and shows;
Step 306, when Activity binds CameraService by bindCameraService (), UI corresponds to phase Machine preview interface corresponds to screen display in foreground by Activity.It is a kind of camera shown in the embodiment of the present invention referring to Fig. 4 The schematic diagram of preview interface.
Step 307, due to the binding of step 306, CameraService control cameras (video recording) run on foreground;
Step 308, in video process, if taking phone, camera applications corresponding A ctivity unbundlings CameraService;
Step 309, in the onUnbind () of CameraService, UI layouts are minimized by hideWindow (), Minimize camera preview interface;
After camera preview interface minimizes, mobile terminal shows that phone application corresponds to interface.
Step 310, camera applications corresponding A ctivity is exited;
Step 311, CameraService Background controls camera continues to record a video;
Step 312, event (for example, again tapping on physical button) triggering is exited via service, CameraService is closed Camera stops video recording;
Step 313, CameraService destroys UI layouts;
Step 314, CameraService is exited.
As it can be seen that the present invention is when Activity is exited, by unbinding CameraService, make CameraService can be with Backstage continues to control camera video recording, to meet real-time recording demand.
Fig. 5 is a kind of hardware architecture diagram of mobile terminal provided by the invention.The terminal 5 includes processor 501, deposits Contain machine readable storage medium 502, the camera Camera504 of machine-executable instruction.Wherein, processor 501 can with machine Reading storage medium 502 can communicate via system bus 503.Also, by read and execute in machine readable storage medium 502 with The corresponding machine-executable instruction of video recording logic based on android system, processor 501 can perform above-described be based on The kinescope method of android system.
Machine readable storage medium 502 referred to herein can be any electronics, magnetism, optics or other physical stores Device can include or store information, such as executable instruction, data, etc..For example, machine readable storage medium can be: RAM (Radom Access Memory, random access memory), volatile memory, nonvolatile memory, flash memory, storage are driven Dynamic device (such as hard disk drive), solid state disk, any kind of storage dish (such as CD, dvd) or similar storage are situated between Matter or combination thereof.
As shown in fig. 6, functionally dividing, the above-mentioned video recording logic based on android system may include Activity601, Service602, wherein:
Activity601, for the use that when the Activity601 is exited, unbundlings are bound with the Activity601 In the service Service602 of control camera Camera video recordings;
The Service602, for Camera video recordings described in Background control.
Optionally,
The Activity601 is additionally operable to, when the Activity601 starts, bind the Activity601 and institute State Service602.
Optionally,
The Service602 is additionally operable to load the Camera and corresponds to user interface UI layouts, so that the UI is laid out Corresponding preview interface is shown in the Activity601;The UI layouts are minimized, to hide the preview interface.
Optionally,
The Service602 loads or minimizes the UI cloth specifically for passing through window management WindowManager Office.
The present invention also provides a kind of machine readable storage mediums including machine-executable instruction, such as the machine in Fig. 5 Readable storage medium storing program for executing 502, the machine-executable instruction can be executed by the processor 501 in mobile terminal, to realize above retouch The kinescope method based on android system stated.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention With within principle, any modification, equivalent substitution, improvement and etc. done should be included within the scope of protection of the invention god.

Claims (10)

1. a kind of kinescope method based on Android android system, which is characterized in that the method includes:
When movable Activity is exited, the service for controlling camera Camera video recordings of unbundlings and Activity bindings Service;
Camera described in the Service Background controls records a video.
2. according to the method described in claim 1, it is characterized in that, before the Activity exits, further include:
When the Activity starts, the Activity and the Service are bound.
3. method according to claim 1 or 2, which is characterized in that before the Activity is exited, further include:
The Service loads the Camera and corresponds to user interface UI layouts, so that the corresponding preview interface of UI layouts is aobvious It is shown in the Activity;
After the Service for controlling Camera video recordings that the unbundlings are bound with the Activity, further include:
The Service minimizes the UI layouts, to hide the preview interface.
4. according to the method described in claim 3, it is characterized in that:
The Service is loaded or is minimized the UI layouts by window management WindowManager.
5. a kind of recording apparatus based on Android android system, which is characterized in that described device includes:
Movable Activity is used to control phase for when the Activity is exited, unbinding with what the Activity was bound The service Service of machine Camera video recordings;
The Service, for Camera video recordings described in Background control.
6. device according to claim 5, it is characterised in that:
The Activity is additionally operable to, when the Activity starts, bind the Activity and the Service.
7. device according to claim 5, it is characterised in that:
The Service is additionally operable to load the Camera and corresponds to user interface UI layouts, so that the corresponding preview of UI layouts Interface display is in the Activity;The UI layouts are minimized, to hide the preview interface.
8. device according to claim 7, it is characterised in that:
The Service loads or minimizes the UI layouts specifically for passing through window management WindowManager.
9. a kind of mobile terminal, which is characterized in that described including camera Camera, processor and machine readable storage medium Machine readable storage medium is stored with the machine-executable instruction that can be executed by the processor, and the processor is by the machine Device executable instruction promotes:Realize any method and steps of claim 1-4.
10. a kind of machine readable storage medium, which is characterized in that it is executable to be stored with machine in the machine readable storage medium Claim 1-4 any method and steps are realized in instruction when the machine-executable instruction is executed by processor.
CN201810362691.8A 2018-04-20 2018-04-20 A kind of kinescope method, device and mobile terminal based on android system Pending CN108628596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810362691.8A CN108628596A (en) 2018-04-20 2018-04-20 A kind of kinescope method, device and mobile terminal based on android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810362691.8A CN108628596A (en) 2018-04-20 2018-04-20 A kind of kinescope method, device and mobile terminal based on android system

Publications (1)

Publication Number Publication Date
CN108628596A true CN108628596A (en) 2018-10-09

Family

ID=63694205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810362691.8A Pending CN108628596A (en) 2018-04-20 2018-04-20 A kind of kinescope method, device and mobile terminal based on android system

Country Status (1)

Country Link
CN (1) CN108628596A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130278708A1 (en) * 2012-04-20 2013-10-24 Wayne E. Mock Using Previous Selection Information in a User Interface Having a Plurality of Icons
CN104038698A (en) * 2014-06-25 2014-09-10 深圳市中兴移动通信有限公司 Background photographing method and device
CN106161972A (en) * 2016-09-30 2016-11-23 深圳天珑无线科技有限公司 A kind of method and device of shooting
CN106803978A (en) * 2017-03-16 2017-06-06 上海青橙实业有限公司 Mobile terminal and the method that video is played based on suspension windows
CN107423125A (en) * 2017-07-27 2017-12-01 上海传英信息技术有限公司 A kind of camera shooting control method and shooting control system for intelligent terminal
CN107479788A (en) * 2017-08-07 2017-12-15 深圳天珑无线科技有限公司 The camera arrangement and photographic method of a kind of mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130278708A1 (en) * 2012-04-20 2013-10-24 Wayne E. Mock Using Previous Selection Information in a User Interface Having a Plurality of Icons
CN104038698A (en) * 2014-06-25 2014-09-10 深圳市中兴移动通信有限公司 Background photographing method and device
CN106161972A (en) * 2016-09-30 2016-11-23 深圳天珑无线科技有限公司 A kind of method and device of shooting
CN106803978A (en) * 2017-03-16 2017-06-06 上海青橙实业有限公司 Mobile terminal and the method that video is played based on suspension windows
CN107423125A (en) * 2017-07-27 2017-12-01 上海传英信息技术有限公司 A kind of camera shooting control method and shooting control system for intelligent terminal
CN107479788A (en) * 2017-08-07 2017-12-15 深圳天珑无线科技有限公司 The camera arrangement and photographic method of a kind of mobile terminal

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
WENT0213: ""Android在service中实现后台录像"", 《HTTPS://BLOG.CSDN.NET/WENT0213/ARTICLE/DETAILS/44956777?UTM_SOURCE=BLOGXGWZ7》 *
晓果博客: ""android关闭手机偷录她人功能实现(退出程序依然录像)"", 《HTTPS://BLOG.CSDN.NET/HUANGXIAOGUO1/ARTICLE/DETAILS/53648825》 *
黄宇健 等: "《Android项目开发范例大全》", 31 August 2012, 中国铁道出版社 *

Similar Documents

Publication Publication Date Title
CN102866913B (en) Task switching on mobile device
RU2702049C2 (en) Real-time sharing during telephone call
US9588865B2 (en) System and method for displaying usage history of applications executed between devices
US8656297B2 (en) Enhanced virtualization system
EP2472399A1 (en) Mobile terminal and method for managing tasks at a platform level
CN105786473A (en) Task management method and device of multi-task interface as well as terminal equipment
US20100042801A1 (en) Apparatus and method for reallocation of memory in a mobile communication terminal
CN1981265A (en) A method for controlling the operation of a display screen in a computing device
CN114095776B (en) Screen recording method and electronic equipment
CN113347477A (en) Method, device and system for sharing camera by multiple applications
CN104391623A (en) Display method and electronic equipment
US20170237936A1 (en) Information processing apparatus, method for controlling the information processing apparatus, and recording medium
EP3671627A1 (en) Image processing method and device
CN113301157A (en) Cloud mobile phone group control method, equipment and storage medium based on android system
CA2710416A1 (en) Method and device for application archiving
US9554082B2 (en) Recording apparatus, recording method, and program
CN110798521B (en) File sharing method and device, electronic equipment and storage medium
US20190007596A1 (en) Information processing apparatus, information processing method, and program
CN104063236B (en) Using startup method and electronic equipment
CN108628596A (en) A kind of kinescope method, device and mobile terminal based on android system
JP6478760B2 (en) Recording apparatus, control method therefor, and computer program
CN102081920B (en) Method and device for controlling picture display
CN109885260A (en) The method and apparatus of storing data for electric terminal
JP7331132B2 (en) Application program installation method, operation method, electronic device, computer readable medium
EP3936990B1 (en) Electronic device and driving method therefor, and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181009