CN103970598B - For the application screen screenshot method and device of mobile terminal - Google Patents

For the application screen screenshot method and device of mobile terminal Download PDF

Info

Publication number
CN103970598B
CN103970598B CN201410195210.0A CN201410195210A CN103970598B CN 103970598 B CN103970598 B CN 103970598B CN 201410195210 A CN201410195210 A CN 201410195210A CN 103970598 B CN103970598 B CN 103970598B
Authority
CN
China
Prior art keywords
specified
application
sectional drawing
screen
mobile terminal
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.)
Active
Application number
CN201410195210.0A
Other languages
Chinese (zh)
Other versions
CN103970598A (en
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.)
Honor Device Co Ltd
Original Assignee
Huawei Device 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 Huawei Device Co Ltd filed Critical Huawei Device Co Ltd
Priority to CN201410195210.0A priority Critical patent/CN103970598B/en
Priority claimed from CN201110329295.3A external-priority patent/CN102521020B/en
Publication of CN103970598A publication Critical patent/CN103970598A/en
Application granted granted Critical
Publication of CN103970598B publication Critical patent/CN103970598B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a kind of application screen screenshot methods and device for mobile terminal, belong to field of mobile terminals.This method includes:Switching command is received, the switching command is used for the specified application switching of the mobile terminal to running background;The specified region of the application screen of the specified application is intercepted, obtains specified region sectional drawing;The specified region sectional drawing is preserved, by the specified application switching to running background.The embodiment of the present invention passes through before application screen Activity is closed, when Activity windows are also shown, sectional drawing is carried out to application screen, obtain the real screen of the last time of Activity, avoid high EMS memory occupation caused by carrying out sectional drawing after application screen is closed, screenshotss efficiency is improved, reduces EMS memory occupation and call number.

Description

For the application screen screenshot method and device of mobile terminal
Technical field
The present invention relates to field of mobile terminals, more particularly to a kind of application screen screenshot methods and dress for mobile terminal It puts.
Background technology
With the development of mobile terminal, as on an example smart mobile phone of mobile terminal mostly equipped with android system, Android be increase income one of google for developing the software platform of mobile process, it include operating system, middleware and Some key applications.Mobile terminal user's switching activity (Activity) is a kind of standard component of Android platform.Actually One Activity is exactly a single screen in applying, it is inherited from Activity classes, it is made of display Views UI (User Interface, user interface) and response events.
But the prior art under Android platform to the application scenarios such as task manager and Home multipads When being managed, the application screen of running background can only be obtained, the screen of all historical usages can not be read, user is not easy Find the application for oneself thinking switching so that in application switching, the leeway that UI is played is few, shows not intuitive, poor user experience.
Invention content
An embodiment of the present invention provides a kind of application screen screenshot methods and device for mobile terminal.The technical side Case is as follows:
A kind of application screen screenshot method for mobile terminal, including:
Switching command is received, the switching command is used for the specified application switching of the mobile terminal to running background;
The specified region of the application screen of the specified application is intercepted, obtains specified region sectional drawing;
Preserve the specified region sectional drawing;
By the specified application switching to running background.
A kind of application screen sectional drawing device for mobile terminal, including:
Receiving module, for switching command, the switching command is used to arrive the specified application switching of the mobile terminal Running background;
Screen capture module for intercepting the specified region of the application screen of the specified application, obtains specified region sectional drawing;
Preserving module, for preserving the specified region sectional drawing;
Handover module, for by the specified application switching to running background.
The advantageous effect of technical solution provided in an embodiment of the present invention is:
By before application screen Activity is closed, when Activity windows are also shown, being cut to application screen Figure obtains the real screen of the last time of Activity, avoids height caused by sectional drawing is carried out after application screen is closed EMS memory occupation improves screenshotss efficiency, reduces EMS memory occupation and call number.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, may be used also To obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow chart of application screen screenshot method for mobile terminal provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of application screen screenshot method for mobile terminal provided in an embodiment of the present invention;
Fig. 3 is a kind of application screen screenshot method for mobile terminal provided in an embodiment of the present invention in JAVA environment In exemplary flow chart;
Fig. 4 is a kind of structural representation of application screen sectional drawing device for mobile terminal provided in an embodiment of the present invention Figure.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Before application screen screenshot method provided by the invention is introduced, the rudimentary knowledge of the present invention is carried out first brief Introduction:
Activity is a kind of standard component of Android platform.An actually Activity is exactly one in applying A single screen, it is inherited from Activity classes, it will be shown by the Views UI formed and response events.
History Activity are history Activity, refer to the once opened Activity of user, comprising Activity in running background task.
SurfaceView is a kind of special View views class of Android platform.It is GLSurfaceView and The parent of both 3D view classes of RSSurfaceView.Both 3D views classes all operate in oneself independent drafting thread.Therefore Different from other common View views classes.
Live Wappaper refer to the dynamic wallpaper of Android platform, typically by RSSurfaceView views class reality Existing.
ActivityManagerService refers to Activity management services, is a key in Android platform System service.
WindowManagerService refers to Window management services, is a critical system in Android platform Service.
TaskManager:Refer to task manager, being one, there is task to show, the functions such as switching and kill Android application programs.
Fig. 1 is a kind of flow chart of application screen screenshot method for mobile terminal provided in an embodiment of the present invention.It should The executive agent of embodiment is mobile terminal, and referring to Fig. 1, which specifically includes:
101st, the instruction for closing specified application screen is received;
In the present embodiment, at least one application is run on mobile terminal, which currently can be at full frame state.The use It is to switch by the switching command of specified application switching to running background or by another application in closing instructing for specified application screen To the switching command of front stage operation or the out code of the specified application of closing.Wherein, when instruction be by specified application switching to after During the switching command of platform operation, which can manually be triggered by mobile terminal user, e.g., specified application is minimized etc., it should Instruction can also be triggered according to preset condition, and e.g., designated program was in idle condition in 20 minutes, then triggering is used to specify Application switching to running background switching command.
It will be appreciated by those skilled in the art that the life cycle of an application Acitvity includes:Start one During Activity, after the constructed fuction of Activity () is finished, system calls onCreate () method, sets herein Then the global state and resource of Activity calls onStart () method, is finished in this method, Activity exists It is visible in screen.The onResume () method of execution, this when waiting window things of the Acitvity in loop is recycled Part.When window portion is visible, that is to say, that Acitvity is not onFreeze () method of Activity at front end Called, this method preserves some internal states of Activity.Then window suspends, before Activity is appeared in most again End, onResume () method of activity are called.If Activity windows are invisible, illustrate Activity's OnStop () method is called, and when covering the close of Activity, onRestart () method of activity is opened Begin to call, then repeatedly onStart () method.When system Resource recovery or Activity are called finish () method, Activity stops, and onDestroy () is called to discharge the resource that Activity possesses.
102nd, the specified region of the specified application screen is intercepted, obtains specified region sectional drawing;
In the present embodiment, which can be entire application screen or by the preset area of mobile terminal Domain, the embodiment of the present invention are not specifically limited.By the screenshotss to specifying region, the view of status bar can be obtained, it can be with As needed whether part containing status bar.
It should be noted that the step 102 of the present embodiment is after the instruction closed and specify application screen is received, and It is carried out before specified application screen is closed, with the description to the life cycle of Acitvity in the prior art in step 101 It compares, screenshotss of the prior art are happened at after the onStop () method of calling, and the screenshotss of the present invention are to call After onPause () method, before calling onStop () method.
103rd, the specified region sectional drawing is preserved, closes the specified application screen.
In the present embodiment, after mobile terminal preserves the sectional drawing to specifying application screen, the specified application screen, root are closed According to the instruction received, it is specified using or by specified application switching to running background to close this.
After step 103, further include:
When receiving the instruction for checking the specified application, the specified region sectional drawing is obtained, and is shown described specified Region sectional drawing.
Method provided in this embodiment, by before application screen Activity is closed, when window is also shown, to application Screen carries out sectional drawing, obtains the real screen of the last time of Activity, avoids and cut after application screen is closed High EMS memory occupation caused by figure, improves screenshotss efficiency, reduces EMS memory occupation and call number.
Fig. 2 is a kind of flow chart of application screen screenshot method for mobile terminal provided in an embodiment of the present invention.It should The executive agent of embodiment is mobile terminal, a specified application is currently run on mobile terminal, referring to Fig. 2, the embodiment is specific Including:
201st, mobile terminal receives the instruction for closing specified application screen;
The step 201 is identical with step 101 principle, and details are not described herein.
202nd, mobile terminal is according to screen dimensions and pre-set zoom ratio are locally displayed, by the specified of the specified application screen Region zooms in and out, and intercepts the thumbnail after the scaling, obtains specified region sectional drawing;
In the present embodiment, the screen size that screen dimensions refer to mobile terminal, usually, application screen is locally displayed Size is identical with the size of local display, and the original size that is to say sectional drawing is the size of local display;Specified application screen The specified region of curtain can be by mobile terminal user according to browsing custom setting, which can be the complete of specified application screen Shield region, or some region of specified application screen;Pre-set zoom ratio is accustomed to by mobile terminal user according to browsing Deng setting, the embodiment of the present invention is not specifically limited.Then the step 202 specifically includes:Acquisition for mobile terminal local display ruler Very little and pre-set zoom ratio, and original dimension of the screen dimensions to specify application screen is locally displayed, according to pre-set zoom ratio, The specified region of application screen is specified to zoom in and out this, obtain the thumbnail after scaling, and intercept the thumbnail after scaling, obtained To specified region sectional drawing.
The specific method of the sectional drawing can by call drawFB () complete, it will be appreciated by those skilled in the art that DrawFB () is a kind of drafting method, which obtains the current image of display screen by calling one to preset display equipment, And the buffer pixels of the default display equipment are read, Bitmap images are generated using the buffer pixels, due to drawFB () It is to be drawn by default display equipment, range also includes the status bar of the display screen, expands the range of screenshotss.
For example, the drawFB () function can specifically be expressed as below:
203rd, specified region sectional drawing is preserved, closes specified application screen;
In the present embodiment, the specified region of the specified application screen is intercepted, specified region sectional drawing is obtained, preserves this and refer to After determining region sectional drawing, specified application screen is closed, the step of which specifies application screen after sectional drawing, ensure that sectional drawing Completeness and efficiency avoids and carries out sectional drawing after shutdown and lead to sectional drawing blank screen so that regarded by GLSurfaceView classes The Activity or background that pel element, RSSurfaceView class views element are formed are LiveWallpaper class wallpapers Activity being capable of accurate screenshotss.
204th, when receiving the instruction for checking the specified application, the specified region sectional drawing is obtained, and described in display Specified region sectional drawing.
In the present embodiment, this checks that the instruction of specified application can be to check the instruction of historical usage or check that backstage is transported The instruction of row application.The instruction can be started by the task manager of mobile terminal to be triggered, for example, when the task pipe of mobile terminal When managing device startup, display preserves the specified region sectional drawing of the application of running background so that mobile terminal user can intuitively look into It sees the application of running background, and knows the last operating status of the application of running background.The instruction can be directed to all history Using or running background application or do not done for some historical usage or running background application, the embodiment of the present invention It is specific to limit.In this embodiment, mobile terminal can browse specified application, switched according to the operational order received With release etc. operations.Wherein, browsing refers to check that switching refers to specified application to the last operating status of specified application Running background is switched to from front stage operation or specified application is switched to front stage operation from running background, and release, which refers to delete, to be referred to Determine the specified region sectional drawing of program.
Above-described embodiment can be used in the embedded product using Android platform, such as tablet computer, set-top box and fixation Platform etc..
For example, in the prior art, when a new Activity enters front stage operation, old Activity is entered OnPause () life state, Activity old at this time are still visible.When old Activity windows are invisible, old Activity has been put into onStop () life state.The screenshotss algorithm of Android platform be onStop () life state into Row interception, because window is invisible, need to repaint old Activity and obtain screen thumbnail.Not only efficiency is low in this way Under, also it is difficult to obtain the real screen of the last time of old Activity.Therefore, the embodiment of the present invention is used onPause () Sectional drawing is carried out in life state, referring to Fig. 3, Fig. 3 is a kind of application screen for mobile terminal provided in an embodiment of the present invention The exemplary flow chart in JAVA environment of screenshot method.Wherein, described in the present invention onCreate (), onStart (), onRestart (), onResume (), drawFB (), onPause (), onStop (), onDestory () are abstract Function does not implement, and concrete application heavy duty is needed to realize.For the life cycle of an Activity, have following Process:When Activity starts, onCreate (), onStart () and onResume () are called successively, makes Activity normal Operation, and when Activity screens switchs, drawFB () is called to carry out screenshotss, recalls onStop (), at this time Activity It is invisible, can subsequently there be following three kinds of situations any one:OnDestory (), the Activity is called to terminate;Or, When another Activity needs memory, process is killed, another Activity calls onCreate ();Or, as the Activity Foreground is again introduced into, calls onRestart ();
Method provided in this embodiment, by before application screen Activity is closed, when window is also shown, to application Screen carries out sectional drawing, obtains the real screen of the last time of Activity, avoids and cut after application screen is closed High EMS memory occupation caused by figure, improves screenshotss efficiency, reduces EMS memory occupation and call number.
Fig. 4 is a kind of structural representation of application screen sectional drawing device for mobile terminal provided in an embodiment of the present invention Figure.Referring to Fig. 4, which specifically includes:
Receiving module 401, for receiving the instruction for closing specified application screen;
Screen capture module 402 for intercepting the specified region of the specified application screen, obtains specified region sectional drawing;
Preserving module 403 for preserving the specified region sectional drawing, closes the specified application screen.
Wherein, the screen capture module 402 includes:
Screen dimensions and pre-set zoom ratio are locally displayed for basis, by the finger of the specified application screen in unit for scaling Determine region to zoom in and out;
Sectional drawing unit for intercepting the thumbnail after the scaling, obtains specified region sectional drawing.
Described device further includes:
Display module, for when receiving the instruction for checking the specified application, obtaining the specified region sectional drawing, and Show the specified region sectional drawing.
The switching of specified application switching to the running background is is referred to by the instruction for being used to close specified application screen It enables or another application is switched into the switching command of front stage operation or closes the out code of the specified application.
Device provided in this embodiment specifically can belong to same design with mobile terminal with embodiment of the method, specific real Existing process refers to embodiment of the method, and which is not described herein again.
The all or part of above-mentioned technical proposal provided in an embodiment of the present invention can pass through the relevant hardware of program instruction It completes, described program can be stored in the storage medium that can be read, which includes:ROM, RAM, magnetic disc or light The various media that can store program code such as disk.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.

Claims (2)

1. a kind of application screen screenshot method for mobile terminal, which is characterized in that including:
Switching command is received, the switching command is used for the specified application switching of the mobile terminal to running background;
It is described it is specified apply visible in screen when, screen dimensions and pre-set zoom ratio are locally displayed according to the mobile terminal Example, the specified region of the application screen of the specified application is zoomed in and out, and intercept the thumbnail after the scaling automatically, obtained It to specified region sectional drawing and preserves, the specified region sectional drawing includes status bar;
By the specified application switching to running background;
When receiving the instruction for checking running background application, show that the specified region of the specified application of the preservation is cut Figure;
Receive operational order, and according to the operational order by the specified application from being switched to front stage operation from the background.
2. a kind of application screen sectional drawing device for mobile terminal, which is characterized in that including:
Receiving module, for switching command, the switching command is used for the specified application switching of the mobile terminal to backstage Operation;
Screen capture module, for it is described it is specified apply visible in screen when intercept the application screen of the specified application automatically Specified region, obtains specified region sectional drawing, and the specified region sectional drawing includes status bar;
Preserving module, for preserving the specified region sectional drawing;
Handover module, for by the specified application switching to running background;
Display module, for when receiving the instruction for checking running background application, showing the specified application of the preservation Specified region sectional drawing;
The receiving module is additionally operable to receive operational order, and the handover module is additionally operable to the finger according to the operational order Fixed application from being switched to front stage operation from the background;
The screen capture module specifically includes:
Unit for scaling, should by described specify for screen dimensions and pre-set zoom ratio to be locally displayed according to the mobile terminal The specified region of application screen zooms in and out;
Sectional drawing unit for intercepting the thumbnail after the scaling, obtains specified region sectional drawing.
CN201410195210.0A 2011-10-26 2011-10-26 For the application screen screenshot method and device of mobile terminal Active CN103970598B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410195210.0A CN103970598B (en) 2011-10-26 2011-10-26 For the application screen screenshot method and device of mobile terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110329295.3A CN102521020B (en) 2011-10-26 2011-10-26 Application screen capture method and application screen capture device for mobile terminals
CN201410195210.0A CN103970598B (en) 2011-10-26 2011-10-26 For the application screen screenshot method and device of mobile terminal

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201110329295.3A Division CN102521020B (en) 2011-10-26 2011-10-26 Application screen capture method and application screen capture device for mobile terminals

Publications (2)

Publication Number Publication Date
CN103970598A CN103970598A (en) 2014-08-06
CN103970598B true CN103970598B (en) 2018-06-26

Family

ID=51240133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410195210.0A Active CN103970598B (en) 2011-10-26 2011-10-26 For the application screen screenshot method and device of mobile terminal

Country Status (1)

Country Link
CN (1) CN103970598B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105701127A (en) * 2014-11-27 2016-06-22 广州市动景计算机科技有限公司 Webpage screen capture processing method and apparatus
CN105320436A (en) * 2015-07-07 2016-02-10 崔景城 Method for triggering screen capturing by tapping screen with finger joint
CN106371694A (en) * 2016-08-26 2017-02-01 乐视控股(北京)有限公司 Intelligent image capture method and apparatus used for optional global or local image capture, and terminal device
CN106802803B (en) * 2017-01-06 2020-06-05 腾讯科技(深圳)有限公司 Application data processing method and device
CN110096324B (en) * 2019-04-22 2022-11-25 四川易简天下科技股份有限公司 Efficient screen capture method for automatically filtering self window based on windows system
CN111290676B (en) * 2020-03-02 2021-02-12 北京金山安全软件有限公司 Method, device and equipment for intercepting picture of designated area in client

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101122857A (en) * 2007-09-24 2008-02-13 腾讯科技(深圳)有限公司 Snatch screen system and method
CN101477440A (en) * 2009-01-15 2009-07-08 腾讯科技(深圳)有限公司 Screen capturing method and system
CN101655808A (en) * 2009-09-07 2010-02-24 宇龙计算机通信科技(深圳)有限公司 Application program management method and mobile communication terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101122857A (en) * 2007-09-24 2008-02-13 腾讯科技(深圳)有限公司 Snatch screen system and method
CN101477440A (en) * 2009-01-15 2009-07-08 腾讯科技(深圳)有限公司 Screen capturing method and system
CN101655808A (en) * 2009-09-07 2010-02-24 宇龙计算机通信科技(深圳)有限公司 Application program management method and mobile communication terminal

Also Published As

Publication number Publication date
CN103970598A (en) 2014-08-06

Similar Documents

Publication Publication Date Title
CN102521020B (en) Application screen capture method and application screen capture device for mobile terminals
CN103970598B (en) For the application screen screenshot method and device of mobile terminal
US8863157B2 (en) Method, device, and mobile terminal for API interception
AU2021229220B2 (en) Image processing method and device
CN109240791B (en) Application program display method, application program display device and mobile terminal
CN104252284A (en) File display method and device
WO2017211226A1 (en) Method for displaying media file, terminal, and storage medium
CN108496198B (en) Image processing method and device
CN112118459A (en) Method for realizing common live broadcast of multiple apps by sharing camera data and readable medium
KR102121905B1 (en) Method and apparatus for setting background of ui control, and terminal
CN104836906A (en) Mobile terminal and method for acquiring images from short message operation interface in real time thereof
CN102404633A (en) Monitoring module, intelligent television system and television
CN107515792B (en) Method and device for processing message by using function class Handler
CN114980286A (en) Electronic equipment screen-off display method
CN102377853A (en) Management device and method for application, interface window and service of mobile terminal
US11194598B2 (en) Information display method, terminal and storage medium
CN113434243B (en) Weex page-based screenshot method, device, equipment and storage medium
KR20230086770A (en) Shooting method, shooting device, electronic device and readable storage medium
CN111752661A (en) Interface display method and device, electronic equipment and storage medium
CN110928630A (en) Activation control method, device and equipment for application program window and storage medium
CN112684963A (en) Screenshot method and device and electronic equipment
US20180004476A1 (en) Media production to operating system supported display
CN111782113B (en) Display method, display device and computer-readable storage medium
CN103777855A (en) Method and device for capturing mobile terminal screen
CN113467768A (en) Mobile terminal application development processing device and method based on plug-in architecture

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 518129 Building 2, B District, Bantian HUAWEI base, Longgang District, Shenzhen, Guangdong.

Patentee after: Huawei terminal (Shenzhen) Co.,Ltd.

Address before: 518129 Building 2, B District, Bantian HUAWEI base, Longgang District, Shenzhen, Guangdong.

Patentee before: HUAWEI DEVICE Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20181224

Address after: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee after: HUAWEI DEVICE Co.,Ltd.

Address before: 518129 Building 2, B District, Bantian HUAWEI base, Longgang District, Shenzhen, Guangdong.

Patentee before: Huawei terminal (Shenzhen) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210420

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Device Co.,Ltd.

Address before: Metro Songshan Lake high tech Industrial Development Zone, Guangdong Province, Dongguan City Road 523808 No. 2 South Factory (1) project B2 -5 production workshop

Patentee before: HUAWEI DEVICE Co.,Ltd.