locked
Update clipboard before app de-activated

    Question

  • hi there,

    My application need set some clipboard content before app lost focus or switch to background;

    Currently I got deactivated event but it is too late - that happens after it has lost focus, and clipboard::setcontent can not work then!

    Could any one point me a way, is there any before deactivated event that I can leverage?

    Thanks!!!

    Wednesday, March 05, 2014 5:13 PM

All replies

  • BTW, I am totally not understand, why a background task or app not suspended can not set clipboard content??? If you do not want to it work, then why you enable it during debug mode?? That is a big trap for people!

    You said it is by design... I see Android, iOS, there is no such design. We've give authorization for each apps, we should trusted them know what they do, I strongly urge that MS remove this kind of limitation!

    Wednesday, March 05, 2014 5:19 PM
  • When to set the clipboard will depend on the scenario. What are you setting and why? Can you set it when the data changes?

    --Rob

    Thursday, March 06, 2014 2:40 AM
    Owner
  • hi Rob,

    Generally speaking, the data I need to set to clipboard is on a remote server; when I first connect to the sever I will sync my local data to it, while when I was deactivated, I need sync its data back to my clipboard, however, during my app life time, I did not care about its data change, I only need its data when I am going to be in background.

    I do not want to sync data whenever a server side data is changed -- that will cause too much data transfer, and those data is not necessary for me.

    Thursday, March 06, 2014 7:24 AM
  • Why do you need to set this to the clipboard then? What is your goal for this data?

    The clipboard is for the user, not the app, and setting things without the user's request is a good way to confuse and frustrate the user.

    When the user requests the data be copied you can download it and set it.

    --Rob

    Thursday, March 06, 2014 6:54 PM
    Owner
  • Before app switch to other, server data is visible and valid through all my app; and just as app swtich happend, I tread this data as a last valid data and sync back to my client. That's it.

    WHAT I AM COMPLAIN IS EITHER WINDOWS NOT PROVIDE A CHANCE THAT LET APP KNOW BEFORE IT WILL BE SWAP OUT, OR GIVE A CHANCE THAT LET APP ACCESS CLIPBOARD WHEN IN BACKGROUND.

    Sunday, March 09, 2014 12:05 PM