locked
Restoring Apps State

    Question

  • Hey guys,

    I need to clarify my few doubts. Please dont redirect me to other links, i have already tried all of them, I need experts here to answer them...

    1>When should I restore any apps' settings--->When app is terminated OR When app is ClosedByUser

    2>If OnLaunched event is fired only when app starts from NotRunning state, then why is there the need of Kind property in LaunchedEventArgs?

    3>When is the Suspending event fired---After 10 seconds when system is about to send app to suspended state OR just when user sends the app to background state.

    Please help me asap...I have been banging my head on this for several hours

    Monday, December 15, 2014 2:47 PM

Answers

  • (1) Depend on how you define "setting"

    If syou "Setting" means system setting, like audio volumn, my favorites..etc. You need restore these setting both of "terminated" and "closedbyuser".

    (2) When users start up app by click secondary tiles, we need this argument to decide what we do next.

    (3) When Suspending event has been fired, it means app will be suspended for a while.


    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

    • Marked as answer by RahulRanjan123 Monday, December 15, 2014 4:34 PM
    Monday, December 15, 2014 3:28 PM
  • There are many reasons for it to happen.

    (1) set it to backgound and has't set it back to foreground for a long time (exaclty time need to test)

    (2) before OS terminated it

    (3) User close by slide down, or click close button (x), before app has been closed, it will go to suspending first.

    for more information , see: Application lifecycle (Windows Runtime apps)


    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。



    Monday, December 15, 2014 4:42 PM

All replies

  • (1) Depend on how you define "setting"

    If syou "Setting" means system setting, like audio volumn, my favorites..etc. You need restore these setting both of "terminated" and "closedbyuser".

    (2) When users start up app by click secondary tiles, we need this argument to decide what we do next.

    (3) When Suspending event has been fired, it means app will be suspended for a while.


    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

    • Marked as answer by RahulRanjan123 Monday, December 15, 2014 4:34 PM
    Monday, December 15, 2014 3:28 PM
  • Hey man..thanks....you cleared most of my doubts...

    Can you just elaborate third question a bit more....I mean, I want to know when is the Suspending event fired exactly----as soon as app is sent to background by user by selecting another app OR when after 10 seconds, windows itself is about to suspend it and then the event is fired?

    Monday, December 15, 2014 4:35 PM
  • There are many reasons for it to happen.

    (1) set it to backgound and has't set it back to foreground for a long time (exaclty time need to test)

    (2) before OS terminated it

    (3) User close by slide down, or click close button (x), before app has been closed, it will go to suspending first.

    for more information , see: Application lifecycle (Windows Runtime apps)


    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。



    Monday, December 15, 2014 4:42 PM