CN109195021B - Screenshot sharing method and device - Google Patents

Screenshot sharing method and device Download PDF

Info

Publication number
CN109195021B
CN109195021B CN201810766350.7A CN201810766350A CN109195021B CN 109195021 B CN109195021 B CN 109195021B CN 201810766350 A CN201810766350 A CN 201810766350A CN 109195021 B CN109195021 B CN 109195021B
Authority
CN
China
Prior art keywords
page
picture
screenshot
request
state
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
CN201810766350.7A
Other languages
Chinese (zh)
Other versions
CN109195021A (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.)
Beijing Cat Eyes Culture Media Co ltd
Original Assignee
Beijing Cat Eyes Culture Media 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 Beijing Cat Eyes Culture Media Co ltd filed Critical Beijing Cat Eyes Culture Media Co ltd
Priority to CN201810766350.7A priority Critical patent/CN109195021B/en
Publication of CN109195021A publication Critical patent/CN109195021A/en
Application granted granted Critical
Publication of CN109195021B publication Critical patent/CN109195021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4782Web browsing, e.g. WebTV
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Abstract

The invention provides a screenshot sharing method and device, wherein the screenshot sharing method comprises the following steps: receiving a screenshot request for a first page of an application; if an access request for a second page of the application program is received in the first page, responding to the access request and displaying the second page on the first page; if the second page is displayed completely, informing the first page to perform picture interception on the first page in response to the screenshot request; receiving an image interception result of the first page; receiving a picture sharing request; and if the picture is successfully captured, reading the captured picture according to the attribute information in the picture capturing result, and sharing the picture to the target third-party platform in response to the picture sharing request. The method and the device can execute the screenshot operation of the first page during the period that the user selects the target third-party platform, the page jam of the user operation caused by long time consumption of the screenshot of the first page can be avoided, and better user experience is achieved.

Description

Screenshot sharing method and device
Technical Field
The invention relates to the technical field of communication, in particular to a screenshot sharing method and device.
Background
When using an application program, a user sees a favorite program screen, and wants to share the screen with various community websites or real-time Messaging (IM) friends.
The current screenshot sharing technology mainly receives a screenshot request of a target page of an application program, performs screenshot on the target page, after the screenshot is completed, a user clicks a sharing button, a sharing channel page including icons of various sharable third-party platforms is presented, the user selects one icon of the third-party platform from the sharing channel page, and finally, the screenshot is shared to the selected third-party platform.
The screenshot process is a redrawing process of a view of a target page, and each pixel point in the target page needs to be redrawn in the redrawing process, so that the screenshot of the target page is obtained. And the redrawing process of this view must be executed on the main thread and cannot be executed in the background thread, therefore, this time-consuming operation of screenshot often causes the user interface/system to be stuck. Then to avoid the system jamming affecting the user, the prior art typically displays a loading page during the process of screenshot, for example, the loading page may display a circling icon to prompt the user that a time-consuming operation is currently being performed.
Therefore, in the screenshot sharing scheme, the application program can display the loading page until the screenshot is completed in the screenshot process, and the display time of the loading page is long, so that the problem that the user operates the page in a stuck state is caused.
Disclosure of Invention
The invention provides a screenshot sharing method and device, and aims to solve the problem that a screenshot sharing scheme in the prior art is long in screenshot time, so that a user operation page is unsmooth.
In order to solve the above problem, according to an aspect of the present invention, the present invention discloses a screenshot sharing method, including:
receiving a screenshot request for a first page of an application;
if an access request for a second page of the application program is received in the first page, responding to the access request and displaying the second page on the first page, wherein the second page comprises attribute information of a plurality of third-party platforms;
if the second page is displayed completely, informing the first page to respond to the screenshot request to perform picture interception on the first page;
receiving an image intercepting result of the first page, wherein if the image intercepting is successful, the image intercepting result comprises attribute information of the intercepted image;
receiving a picture sharing request, wherein the picture sharing request comprises attribute information of a target third-party platform selected by a user in the second page;
if the picture is successfully captured, reading the captured picture according to the attribute information in the picture capturing result, and sharing the picture to the target third-party platform in response to the picture sharing request.
Optionally, before notifying the first page to perform image capture on the first page in response to the screenshot request if the second page is displayed completely, the method further includes:
if an access request for a second page of the application program is received in the first page, setting a listener for a view of the second page, wherein the listener is used for monitoring a drawing process of the view of the second page;
and if the listener monitors that the view drawing of the second page is finished, determining that the display of the second page is finished.
Optionally, if the first page is a dynamic page, the method further includes:
if an access request for a second page of the application program is received in the first page, marking the first page at a target time point, wherein the target time point is a time point of receiving the access request for the second page;
if the second page is displayed completely, the first page is informed to respond to the screenshot request to perform picture interception on the first page, and the method comprises the following steps:
and if the second page is displayed completely, informing the first page to respond to the screenshot request to perform picture interception on the marked first page.
Optionally, if the second page is displayed completely, after the first page is notified to perform image capture on the first page in response to the screenshot request, the method further includes:
marking the page state of the second page as a waiting state, wherein the waiting state represents waiting for the picture interception result of the first page;
after receiving the picture interception result of the first page, the method further includes:
judging whether the first page is successfully captured or not according to the image capturing result;
if so, switching the page state of the second page from the waiting state to a success state;
if not, switching the page state of the second page from the waiting state to a failure state.
Optionally, if not, after the page state of the second page is switched from the waiting state to the failure state, the method further includes:
notifying information representing screenshot failure to a user; or the like, or, alternatively,
and informing the first page again to perform picture interception on the first page in response to the screenshot request, and switching the page state of the second page from the failure state to the waiting state.
According to another aspect of the present invention, the present invention further discloses a screenshot sharing apparatus, including:
the first receiving module is used for receiving a screenshot request of a first page of the application program;
a first response module, configured to, if an access request for a second page of the application program is received in the first page, display the second page on the first page in response to the access request, where the second page includes attribute information of a plurality of third-party platforms;
the first notification module is used for notifying the first page to respond to the screenshot request to intercept the picture of the first page if the second page is displayed completely;
the second receiving module is used for receiving an image intercepting result of the first page, wherein if the image intercepting is successful, the image intercepting result comprises attribute information of the intercepted image;
the third receiving module is used for receiving a picture sharing request, wherein the picture sharing request comprises attribute information of a target third-party platform selected by a user in the second page;
and the second response module is used for reading the intercepted picture according to the attribute information in the picture interception result and sharing the picture to the target third-party platform in response to the picture sharing request if the picture interception is successful.
Optionally, the apparatus further comprises:
the setting module is used for setting a listener for the view of the second page if an access request for the second page of the application program is received in the first page, wherein the listener is used for monitoring the drawing process of the view of the second page;
and the determining module is used for determining that the second page is displayed completely if the view drawing of the second page is monitored by the monitor to be completed.
Optionally, the apparatus further comprises:
a marking module, configured to mark a first page at a target time point if the first page is a dynamic page and an access request for a second page of the application is received in the first page, where the target time point is a time point at which the access request for the second page is received;
the first notification module is further configured to notify the first page to perform picture capturing on the marked first page in response to the screenshot request if the second page is displayed completely.
Optionally, the apparatus further comprises:
the marking module is used for marking the page state of the second page as a waiting state, wherein the waiting state represents that the picture interception result of the first page is waited;
the judging module is used for judging whether the first page is successfully captured or not according to the image capturing result;
the first switching module is used for switching the page state of the second page from the waiting state to a successful state if the judging module determines that the first page picture is successfully intercepted;
and the second switching module is used for switching the page state of the second page from the waiting state to the failure state if the judging module determines that the interception of the first page picture fails.
Optionally, the apparatus further comprises:
the second notification module is used for notifying the information indicating the screen capture failure to the user; or the like, or, alternatively,
and the third informing module is used for informing the first page to carry out picture interception on the first page in response to the screenshot request again and switching the page state of the second page from the failure state to the waiting state.
Compared with the prior art, the invention has the following advantages:
in the embodiment of the invention, after receiving the screenshot request of the first page of the application program, the screenshot request is not responded immediately, but the screenshot request is responded by informing the first page after the second page displaying the third-party platform is displayed, and the focus of the user is on the target third-party platform needing to be shared selected from the second page.
Drawings
FIG. 1 is a flowchart illustrating steps of a screenshot sharing method according to an embodiment of the present invention;
fig. 2 is a block diagram of a screenshot sharing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a screenshot sharing method according to the present invention is shown, which may specifically include the following steps:
step 101, receiving a screenshot request of a first page of an application program;
the application program may be any type of application program installed on the terminal device, such as video software, instant messaging software, search engine software, map software, and the like.
The first page is a page for initiating sharing, that is, a page requiring "screenshot", and is generally a page for displaying services. The content displayed in the page may be static (e.g., static web page, static picture, etc.) or dynamic (e.g., video stream, dynamic picture, etc.).
The triggering operation of the screenshot request may be any form of triggering operation in the known technology, such as triggering of a screenshot shortcut key, triggering of a screenshot gesture, triggering of a screenshot button, triggering of a screenshot voice, and the like.
Step 102, if an access request for a second page of the application program is received in the first page, responding to the access request and displaying the second page on the first page;
wherein the second page includes attribute information of a plurality of third party platforms;
in one example, the second page may be a sharing Dialog page, that is, a page popped up after the user clicks a sharing button on the first page (here, clicking the sharing button, that is, triggering an access request to the second page), and this page usually shows icons of a sharing channel (that is, a third-party platform), such as a "WeChat friend" icon, a "WeChat friend circle" icon, a "QQ" icon, a "microblog" icon, and the like, and the form of the second page may be Activity, Fragment, Dialog, and the like, where these three are API class names of the android platform.
Therefore, the attribute information of the third party platform here may be an icon, a name, or the like, for distinguishing the respective third party platforms.
The sharing dialog box page may be directly displayed on the first page, for example, the sharing dialog box page is partially overlaid on the first page for display, or transparently overlaid on the first page for display.
Step 103, if the second page is displayed completely, informing the first page to respond to the screenshot request to capture the picture of the first page;
after receiving the screenshot request of the first page in step 101, the first page does not immediately respond to the screenshot request to perform screenshot, but after the second page is displayed, the second page notifies the first page to immediately respond to the screenshot request of step 101, that is, the first page is really screenshot (i.e., the picture is captured here).
In the embodiment, after receiving the screenshot request, the screenshot is not immediately captured, but when the second page is completely displayed (that is, the view is completely drawn and can be displayed), the first page is notified to capture the screenshot. Then, after the user sees the second page, the user can select a channel to be shared from the multiple sharing channels, and the time for selecting the sharing channel can be basically used for offsetting the time for redrawing the view of the screenshot by the first page. In other words, in the process that the user selects the sharing channel on the second page, the first page is drawing the pixel points of the screenshot, waiting of the user is reduced, the screenshot is basically completed after the user selects the sharing channel, and the pause time of the user for operating the page is reduced.
Optionally, in an embodiment, before step 103, the method according to an embodiment of the present invention may further include:
if an access request for a second page of the application program is received in the first page, setting a listener for a view of the second page, wherein the listener is used for monitoring a drawing process of the view of the second page;
and if the listener monitors that the view drawing of the second page is finished, determining that the display of the second page is finished.
Specifically, in the embodiment of the present invention, the first page cannot be notified to perform the screenshot in the second page onCreate (indicating that the second page has been created and initialized, but has not been drawn yet, and cannot be seen by the user), because the second page has not been displayed when the onCreate of the second page is completed. That is, the user does not actually see the second page, and if the first page is notified to start the screenshot at this time, the user still feels that the screenshot is 1 second, and then sees the second page.
In order to better control the timing of notifying the first page of starting the screenshot, in the embodiment of the present invention, after receiving an access request for the second page, a listener may be set for the view of the second page, and the listener is used for monitoring a drawing process of the view of the second page.
For example, a listener OnPreDrawListener may be added to the View (View) of the second page by the method of instruction 1;
instruction 1: getviewtreeoobserver (). addOnPreDrawListener;
the method of instruction 1 may listen for a callback that the view tree of the second page is ready to begin drawing, i.e., a timing at which the view of the second page is about to begin drawing.
In onPreDraw callback of getviewtreeboserver. (because the onPreDraw callback received indicates that the view is ready to begin drawing, a message sent at this time is processed after the view drawing is complete). Therefore, the time-consuming operation of starting screenshot of the first page can be realized when the second page is visible to the user.
That is, the step of notifying the first page of picture interception of the first page in response to the screenshot request in step 103 may be implemented in a manner that the second page sends event a.
Therefore, the embodiment of the invention can accurately monitor the view drawing process of the second page by setting the monitor for the view of the second page after receiving the access request of the second page, timely capture the time when the view drawing of the second page is completed, and inform the first page of screenshot operation at the first time after the view drawing of the second page is completed, thereby avoiding informing the first page of screenshot when the second page is not drawn yet.
104, receiving an image interception result of the first page;
if the picture is successfully intercepted, the picture intercepting result comprises attribute information of the intercepted picture;
in an example, the time-consuming screenshot operation of a first page can be divided into two parts, wherein the first part is to execute view. The second part is to store the Bitmap (Bitmap file) in the memory with the screenshot completed as a file to be written to the local (for example, an SD expansion card of a mobile phone), and the process of the second part can be completed in a background thread without causing the user interface to be stuck;
then, after the screenshot file to be shared is stored, the first page sends an event B (i.e., the picture capture result) to notify the second page that the screenshot operation is completed, and transmits some necessary parameters (e.g., whether the screenshot is successful, if the screenshot is successful, the stored storage path and file name of the screenshot file, etc.).
Optionally, in an embodiment, after step 103, the method according to an embodiment of the present invention may further include:
marking the page state of the second page as a waiting state, wherein the waiting state represents waiting for the picture interception result of the first page;
accordingly, after step 104, the method according to the embodiment of the present invention may further include:
judging whether the first page is successfully captured or not according to the image capturing result;
continuing with the above example, after the second page receives the event B of the first page, the event B (i.e., the picture capture result) carries the parameter, and then it can be determined whether the screenshot of the first page is successful or the screenshot is failed according to the parameter. If the parameters comprise information such as a storage path and a file name of the screenshot file, the screenshot is successful; and otherwise, the screenshot fails.
If so, switching the page state of the second page from the waiting state to a success state;
if the screenshot is successful, the page status of the second page may be switched from the waiting status to a successful status, so as to continue to execute the subsequent step 106.
If not, switching the page state of the second page from the waiting state to a failure state.
And if the screenshot fails, switching the page state of the second page from the waiting state to a failure state.
In this way, after the second page sends the event a, the page state can be set to a waiting state, the page state is determined to be updated from the waiting state to a success state or a failure state according to the event B received from the first page, and the subsequent sharing operation can be continued under the condition that the page state is updated to the success state (for example, the picture file capable of initiating the sharing and reading of the corresponding storage path is successfully shared in the sharing channel selected by the user, and for example, the user is notified or retry operation is executed if the picture file fails).
For the case that the page state of the second page is switched from the waiting state to the failure state, optionally, in an embodiment, after the step of switching the page state of the second page from the waiting state to the failure state if the page state of the second page is not switched from the waiting state to the failure state, the method according to the embodiment of the present invention may further include:
notifying information representing screenshot failure to a user;
for example, a prompt box is displayed, and the text content of the screenshot which is failed and is requested to be re-screenshot is displayed in the prompt box.
Or the like, or, alternatively,
and informing the first page again to perform picture interception on the first page in response to the screenshot request, and switching the page state of the second page from the failure state to the waiting state.
That is, the second page may send the event a to the first page again, thereby notifying the first page of a re-operation of the screenshot, and switching the page state of the second page from the failure state to the waiting state.
Therefore, after the screenshot of the first page fails, the method provided by the embodiment of the invention can also inform the user of the information of the screenshot failure, or inform the first page of the screenshot re-operation, so that the screenshot success rate is improved.
Optionally, in an embodiment, the method according to an embodiment of the present invention further includes:
and if the page state of the second page is a waiting state, responding to any received request, displaying a loading page and prompting a user to wait.
That is, as long as the second page is in the waiting state, no matter the second page receives any request, the response mode to the request is to display the loading page.
For example, after the second page is displayed, the user quickly selects a required sharing channel from the sharing channels to trigger the picture sharing request, but since the screenshot operation of the first page is not completed yet, that is, the second page is still in a waiting state, a loading page is also displayed to the user to prompt the user to wait.
In this way, for the case that the user selects the third-party platform in the second page too fast, the embodiment of the present invention may display the loading page to prompt the user to wait based on the waiting status in the second page.
However, under normal conditions, the selection of the sharing channel in the second page by the user is not less than 1 second, and therefore, the application probability of the embodiment is low.
Step 105, receiving a picture sharing request, wherein the picture sharing request includes attribute information of a target third-party platform selected by a user in the second page;
in the process of screenshot of the first page, the user selects a target third-party platform needing to be shared in the second page, and the time for the user to select the platform in the second page is generally not less than 1 second, so that the screenshot consuming operation of the first page is completed in the time for selecting the platform, and the user does not feel the existence of the loading page. After the user selects the required attribute information, such as an icon, of the target third-party platform, the method of the embodiment of the invention can receive the picture sharing request.
And 106, if the picture is successfully captured, reading the captured picture according to the attribute information in the picture capturing result, and sharing the picture to the target third-party platform in response to the picture sharing request.
If the first page picture is successfully intercepted according to the information in the picture interception result received by the second page from the first page, the storage path of the terminal equipment can be used for reading the picture file of the file name according to the attribute information in the picture interception result, such as the storage path and the file name; and then, responding to the picture sharing request, and sharing the read picture file to a target third-party platform selected by the user.
In the embodiment of the invention, after receiving the screenshot request of the first page of the application program, the screenshot request is not responded immediately, but the screenshot request is responded by informing the first page after the second page displaying the third-party platform is displayed, and the focus of the user is on the target third-party platform needing to be shared selected from the second page.
Optionally, in an embodiment, if the first page is a dynamic page, the method according to the embodiment of the present invention may further include:
if an access request for a second page of the application program is received in the first page, marking the first page at a target time point, wherein the target time point is a time point of receiving the access request for the second page;
that is, after receiving the access request for the second page, the method of the embodiment of the present invention may perform not only step 102, but also the step of marking the first page at the time point when the access request for the second page is received.
In this embodiment, after receiving an access request to the second page, the first page at the target time point is immediately marked, for example, a video frame image displayed at the target time point in the video stream is marked.
Correspondingly, when step 103 is executed, if the second page is completely displayed, the first page is notified to perform image capture on the marked first page in response to the screenshot request.
Continuing to explain by taking the video stream as an example, after the second page is displayed, the first page is notified to respond to the screenshot request to capture the marked video frame image, that is, the pixel point is redrawn.
In this way, in the embodiment of the present invention, when the content displayed in the first page is dynamic, the first page at the time point when the access request to the second page is received is marked, and after the second page is displayed, when the first page is subjected to screenshot, the marked first page can be subjected to pixel redrawing, so that the first page when the user clicks the sharing button can be intercepted, that is, the first page at the time when the sharing button is clicked is shared, and the intercepted picture is ensured to meet the screenshot requirement of the user.
By means of the technical scheme of the embodiment of the invention, in the embodiment of the invention, when a user clicks the sharing button to prepare screenshot, a sharing dialog box (displaying each sharing channel) is popped up, when the display of the sharing interface is completed, the interface initiating the sharing is informed to start the time-consuming screenshot operation, the sharing dialog box is informed when the screenshot is completed, and the sharing dialog box acquires the intercepted and stored completed picture. After the sharing dialog box is popped up, the focus of the user is on each sharing channel, a short operation gap exists, and the time-consuming screenshot operation is executed in the period, so that the user is not easy to feel the pause of the interface, and better user experience is achieved.
When information is transmitted between the first page and the second page by sending an event, the event may be transmitted in various manners, including but not limited to LocalBroadcastManager, EventBus (event bus, which is a third-party library), and the like.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Corresponding to the method provided by the embodiment of the present invention, referring to fig. 2, a structural block diagram of an embodiment of a screenshot sharing device of the present invention is shown, which may specifically include the following modules:
a first receiving module 21, configured to receive a screenshot request of a first page of an application;
a first response module 22, configured to, if an access request for a second page of the application program is received in the first page, display the second page on the first page in response to the access request, where the second page includes attribute information of multiple third-party platforms;
the first notification module 23 is configured to notify the first page to perform picture capturing on the first page in response to the screenshot request if the second page is displayed completely;
the second receiving module 24 is configured to receive a picture interception result of the first page, where the picture interception result includes attribute information of an intercepted picture if the picture interception is successful;
a third receiving module 25, configured to receive a picture sharing request, where the picture sharing request includes attribute information of a target third-party platform selected by a user in the second page;
and a second response module 26, configured to, if picture capturing is successful, read the captured picture according to the attribute information in the picture capturing result, and share the picture to the target third-party platform in response to the picture sharing request.
Optionally, the apparatus further comprises:
the setting module is used for setting a listener for the view of the second page if an access request for the second page of the application program is received in the first page, wherein the listener is used for monitoring the drawing process of the view of the second page;
and the determining module is used for determining that the second page is displayed completely if the view drawing of the second page is monitored by the monitor to be completed.
Optionally, the apparatus further comprises:
a marking module, configured to mark a first page at a target time point if the first page is a dynamic page and an access request for a second page of the application is received in the first page, where the target time point is a time point at which the access request for the second page is received;
the first notifying module 23 is further configured to notify the first page to perform image capturing on the marked first page in response to the screenshot request if the second page is displayed completely.
Optionally, the apparatus further comprises:
the marking module is used for marking the page state of the second page as a waiting state, wherein the waiting state represents that the picture interception result of the first page is waited;
the judging module is used for judging whether the first page is successfully captured or not according to the image capturing result;
the first switching module is used for switching the page state of the second page from the waiting state to a successful state if the judging module determines that the first page picture is successfully intercepted;
and the second switching module is used for switching the page state of the second page from the waiting state to the failure state if the judging module determines that the interception of the first page picture fails.
Optionally, the apparatus further comprises:
the second notification module is used for notifying the information indicating the screen capture failure to the user; or the like, or, alternatively,
and the third informing module is used for informing the first page to carry out picture interception on the first page in response to the screenshot request again and switching the page state of the second page from the failure state to the waiting state.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The screenshot sharing method and the screenshot sharing device provided by the invention are introduced in detail, a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A screenshot sharing method, comprising:
receiving a screenshot request for a first page of an application;
if an access request for a second page of the application program is received in the first page, responding to the access request and displaying the second page on the first page, wherein the second page comprises attribute information of a plurality of third-party platforms;
if the second page is displayed completely, informing the first page to respond to the screenshot request to perform picture interception on the first page;
receiving an image intercepting result of the first page, wherein if the image intercepting is successful, the image intercepting result comprises attribute information of the intercepted image;
receiving a picture sharing request, wherein the picture sharing request comprises attribute information of a target third-party platform selected by a user in the second page;
if the picture is successfully intercepted, reading the intercepted picture according to the attribute information in the picture intercepting result, and responding to the picture sharing request to share the picture to the target third-party platform;
in the process that the user selects the sharing channel on the second page, the first page carries out pixel point drawing of screenshot; the channel is a third party platform.
2. The method of claim 1, wherein if the second page is completely displayed, before notifying the first page to perform the picture-taking of the first page in response to the screenshot request, the method further comprises:
if an access request for a second page of the application program is received in the first page, setting a listener for a view of the second page, wherein the listener is used for monitoring a drawing process of the view of the second page;
and if the listener monitors that the view drawing of the second page is finished, determining that the display of the second page is finished.
3. The method of claim 1, wherein if the first page is a dynamic page, the method further comprises:
if an access request for a second page of the application program is received in the first page, marking the first page at a target time point, wherein the target time point is a time point of receiving the access request for the second page;
if the second page is displayed completely, the first page is informed to respond to the screenshot request to perform picture interception on the first page, and the method comprises the following steps:
and if the second page is displayed completely, informing the first page to respond to the screenshot request to perform picture interception on the marked first page.
4. The method of claim 1,
if the second page is displayed completely, the first page is informed to respond to the screenshot request and then picture interception is carried out on the first page, and the method further comprises the following steps:
marking the page state of the second page as a waiting state, wherein the waiting state represents waiting for the picture interception result of the first page;
after receiving the picture interception result of the first page, the method further includes:
judging whether the first page is successfully captured or not according to the image capturing result;
if so, switching the page state of the second page from the waiting state to a success state;
if not, switching the page state of the second page from the waiting state to a failure state.
5. The method of claim 4, wherein after the if not, switching the page status of the second page from the wait status to a fail status, the method further comprises:
notifying information representing screenshot failure to a user; or the like, or, alternatively,
and informing the first page again to perform picture interception on the first page in response to the screenshot request, and switching the page state of the second page from the failure state to the waiting state.
6. A screenshot sharing apparatus, comprising:
the first receiving module is used for receiving a screenshot request of a first page of the application program;
a first response module, configured to, if an access request for a second page of the application program is received in the first page, display the second page on the first page in response to the access request, where the second page includes attribute information of a plurality of third-party platforms;
the first notification module is used for notifying the first page to respond to the screenshot request to intercept the picture of the first page if the second page is displayed completely;
the second receiving module is used for receiving an image intercepting result of the first page, wherein if the image intercepting is successful, the image intercepting result comprises attribute information of the intercepted image;
the third receiving module is used for receiving a picture sharing request, wherein the picture sharing request comprises attribute information of a target third-party platform selected by a user in the second page;
the second response module is used for reading the intercepted picture according to the attribute information in the picture intercepting result and sharing the picture to the target third-party platform in response to the picture sharing request if the picture intercepting is successful;
in the process that the user selects the sharing channel on the second page, the first page carries out pixel point drawing of screenshot; the channel is a third party platform.
7. The apparatus of claim 6, further comprising:
the setting module is used for setting a listener for the view of the second page if an access request for the second page of the application program is received in the first page, wherein the listener is used for monitoring the drawing process of the view of the second page;
and the determining module is used for determining that the second page is displayed completely if the view drawing of the second page is monitored by the monitor to be completed.
8. The apparatus of claim 6, further comprising:
a marking module, configured to mark a first page at a target time point if the first page is a dynamic page and an access request for a second page of the application is received in the first page, where the target time point is a time point at which the access request for the second page is received;
the first notification module is further configured to notify the first page to perform picture capturing on the marked first page in response to the screenshot request if the second page is displayed completely.
9. The apparatus of claim 6, further comprising:
the marking module is used for marking the page state of the second page as a waiting state, wherein the waiting state represents that the picture interception result of the first page is waited;
the judging module is used for judging whether the first page is successfully captured or not according to the image capturing result;
the first switching module is used for switching the page state of the second page from the waiting state to a successful state if the judging module determines that the first page picture is successfully intercepted;
and the second switching module is used for switching the page state of the second page from the waiting state to the failure state if the judging module determines that the interception of the first page picture fails.
10. The apparatus of claim 9, further comprising:
the second notification module is used for notifying the information indicating the screen capture failure to the user; or the like, or, alternatively,
and the third informing module is used for informing the first page to carry out picture interception on the first page in response to the screenshot request again and switching the page state of the second page from the failure state to the waiting state.
CN201810766350.7A 2018-07-12 2018-07-12 Screenshot sharing method and device Active CN109195021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810766350.7A CN109195021B (en) 2018-07-12 2018-07-12 Screenshot sharing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810766350.7A CN109195021B (en) 2018-07-12 2018-07-12 Screenshot sharing method and device

Publications (2)

Publication Number Publication Date
CN109195021A CN109195021A (en) 2019-01-11
CN109195021B true CN109195021B (en) 2021-04-02

Family

ID=64936070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810766350.7A Active CN109195021B (en) 2018-07-12 2018-07-12 Screenshot sharing method and device

Country Status (1)

Country Link
CN (1) CN109195021B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857857B (en) * 2019-04-24 2023-10-20 钉钉控股(开曼)有限公司 Interface display method, device and equipment
CN117093386B (en) * 2023-10-19 2024-02-09 腾讯科技(深圳)有限公司 Page screenshot method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185924A (en) * 2011-05-16 2011-09-14 北京奇艺世纪科技有限公司 Method and equipment for sharing video screenshot
CN104486430A (en) * 2014-12-18 2015-04-01 北京奇虎科技有限公司 Method, device and client for realizing data sharing in mobile browser client
CN106095217A (en) * 2016-05-26 2016-11-09 努比亚技术有限公司 Application sharing apparatus, system and method
CN106899489A (en) * 2016-08-02 2017-06-27 阿里巴巴集团控股有限公司 A kind of information processing method and device
CN107122192A (en) * 2017-04-27 2017-09-01 北京三快在线科技有限公司 Webpage view methods of exhibiting, device, computing device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9817484B2 (en) * 2015-01-28 2017-11-14 Smartisan Technology Co., Ltd. Method for capturing screen content of mobile terminal and device thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185924A (en) * 2011-05-16 2011-09-14 北京奇艺世纪科技有限公司 Method and equipment for sharing video screenshot
CN104486430A (en) * 2014-12-18 2015-04-01 北京奇虎科技有限公司 Method, device and client for realizing data sharing in mobile browser client
CN106095217A (en) * 2016-05-26 2016-11-09 努比亚技术有限公司 Application sharing apparatus, system and method
CN106899489A (en) * 2016-08-02 2017-06-27 阿里巴巴集团控股有限公司 A kind of information processing method and device
CN107122192A (en) * 2017-04-27 2017-09-01 北京三快在线科技有限公司 Webpage view methods of exhibiting, device, computing device and storage medium

Also Published As

Publication number Publication date
CN109195021A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
US10877826B2 (en) Message processing method and apparatus, storage medium, and computer device
EP2763034B1 (en) Method and device for image-capturing application screen for use in mobile terminal
CN109725975B (en) Method and device for prompting read state of message and electronic equipment
US9419923B2 (en) Method for sharing function between terminals and terminal thereof
US20160328140A1 (en) Method and apparatus for playing im message
RU2611988C2 (en) Icon display method and device
RU2576498C2 (en) Method and apparatus for creating composite user interface
CN109710370B (en) Session list display method and device and electronic equipment
US10257316B2 (en) Monitoring of node.js applications
CN105955802B (en) Application running method of mobile terminal and mobile terminal
CN106973319B (en) Virtual gift display method and system
US11132123B2 (en) Key display method, terminal, and non-transitory computer-readable medium
US10331327B2 (en) Message display method, apparatus and terminal
CN105045823A (en) Method and device for generating demo file of mobile terminal based on screen capture
US10572097B2 (en) Method and a device for processing messages exchanged between users
CN109195021B (en) Screenshot sharing method and device
CN108933947B (en) Bullet screen display method and device
CN111580769A (en) Display control system, method, device, storage medium and processor
WO2019114352A1 (en) Method and device for application notification control, and terminal
CN111346386B (en) Message processing method and device
CN110048937B (en) Method, device, user terminal and storage medium for displaying chat information in split screen mode
CN110275785B (en) Data processing method and device, client and server
CN112395029A (en) Application program interface display method and device, electronic equipment and storage medium
CN112055164A (en) Information interaction method, device, terminal and storage medium
CN108289056B (en) Method and device for sharing dynamic chart and computing equipment

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
GR01 Patent grant
GR01 Patent grant