locked
Why "Turn off lock screen" cause the socket session being closed. RRS feed

  • Question

  • Dear Madam or Sir,

    I want to ask one question between the "Lock screen" turn on or off and the Socket session.

    [Pre-condition]

    We are developing a Store apps (PC side) to connect Android apk by Socket session.(Mobile device side)

    1. The "Lock Screen", means the setting item in Windows 8.1 Metro charm.

    "Settings ->Permissions->Lock Screen( Allow this app to run in the background and show quick status on the lock screen)"

    2. Socket session, means the connection established between PC store application and Mobile Android apk application.

    [Problems description]

    When start the PC store application, the PC store application will popup a message to remind user to enable background task or not, if we select to enable background task. the connection will be established between PC store application and Mobile apk application by socket session.

    At this time, if we go to setting page in  PC charm, and turn off the Lock screen from the setting page. this will result in the close of the socket session. (we are using ControlChannelTrigger API to enable the background task.)

    [question]

    I want to know why the action of turning off lock screen will cause the socket session being closed, it's by design from  ControlChannelTrigger API or technique limitation?

    If Store apps have the chance to catch the event of "turn off lock screen", if does, what's the event message?

    If we can catch the event, we can consider to re-setup the socket session between store application and APK application.

    Thanks in advance!

    Best Regards,

    Sean Gao

    Wednesday, January 8, 2014 11:16 AM

Answers

  • ControlChannelTrigger (CCT) requires that the app be on the lock screen. If the user removes the app from the lock screen then the app can no longer use CCT and so its sockets get closed un he background. You will need to reopen the connection hen the user launches or restores your app to the foreground.
    Wednesday, January 8, 2014 11:48 AM
    Moderator

All replies

  • ControlChannelTrigger (CCT) requires that the app be on the lock screen. If the user removes the app from the lock screen then the app can no longer use CCT and so its sockets get closed un he background. You will need to reopen the connection hen the user launches or restores your app to the foreground.
    Wednesday, January 8, 2014 11:48 AM
    Moderator
  • Hi Sir,

    Thanks for your reply,  but  the time when turning off the lock screen happens, our application is running in foreground. no the background running, so why the the turning off lock screen action effect the socket session?

    Can you give the advice how we can reconnect to socket?

    Regards,
    Sean Gao

    Wednesday, January 8, 2014 2:23 PM
  • You'll have to run your socket from the foreground process.

    --Rob


    Saturday, January 11, 2014 12:54 AM
    Moderator