locked
How to make the metro app auto start once the system starts without showing the interface of the app ?

    Question

  • The project I am working on used to remind sb something ,

    I need it auto start or run a service to do something else once the system starts ?

    Is there something info about make app auto start in the metro app development ?

    Such as Android, I can configure a service which can run once the system starts , So I can decide whether start the target interface or just do something else?

    Thanks a lot !

    Wednesday, July 18, 2012 8:07 AM

Answers

All replies

  • Metro style apps cannot be configured as a service.  Also the operating system can suspend an application when it is not in the foreground.  What precisely are you trying to accomplish?

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, July 18, 2012 2:11 PM
    Moderator
  • I need my app can start  automatically once the system starts without user starting it , so  it can search some info for user or remind user something !

    I hope my app can listen the startup of the system or configured to auto-start !

    Thanks a lot !

    -Faming

    • Edited by famingyuan Thursday, July 19, 2012 12:39 AM Thanks
    Thursday, July 19, 2012 12:39 AM
  • What you are describing would best be accomplished by a desktop application and not a Metro style app.

    Jeff Sanders (MSFT)

    Thursday, July 19, 2012 12:53 PM
    Moderator
  • That's mean the metro app can not be designed to  alarm clock ?

    how about if I need a alarm program with metro style ?

    -thank you very much , you are the only one who answer my question . Thanks!

    Anyway , thank you , Jeff !

    • Edited by famingyuan Thursday, July 19, 2012 3:03 PM thanks
    Thursday, July 19, 2012 2:59 PM
  • You certainly can do an alarm clock!

    You want to use scheduled notifications to do that:

    http://social.msdn.microsoft.com/search/en-us/windows/apps?query=Scheduled+notifications&Refinement=180

    Sample:

    http://code.msdn.microsoft.com/windowsapps/Scheduled-notifications-da477093/

    -Jeff


    Jeff Sanders (MSFT)

    Thursday, July 19, 2012 3:18 PM
    Moderator
  • You certainly can do an alarm clock!

    You want to use scheduled notifications to do that:

    http://social.msdn.microsoft.com/search/en-us/windows/apps?query=Scheduled+notifications&Refinement=180

    Sample:

    http://code.msdn.microsoft.com/windowsapps/Scheduled-notifications-da477093/

    -Jeff


    Jeff Sanders (MSFT)

    Thank you , Jeff . It really do works even if I restart the system.

    But there is still only one problem .

     If the time I set to the scheduledNotification is 15:00, but I do not start the system before 15:00 but 16:00 , Is still I can get some information from the notification ? I have try this ,but i can not get anything . Maybe this is a little defect .

    Thank you very much ! Jeff.

    • Marked as answer by famingyuan Friday, July 27, 2012 6:45 AM
    • Unmarked as answer by famingyuan Friday, July 27, 2012 6:45 AM
    Friday, July 20, 2012 5:49 AM
  • Two ideas come to mine.  The Scheduled notifications sample scenario 2 shows how to query previous notifications.

    You could set the Snooze Interval and Maximum Snooze Count properties to cover a certain amount of time.

    -Jeff


    Jeff Sanders (MSFT)

    Friday, July 20, 2012 2:57 PM
    Moderator
  • Sorry for late reply.

    I have learned about the Background Task, register  a system event : userPresent .

    when the user login the system or back to system after a long time away,this system event will be triggered.

    I just mark something in the background task to check whether I should do something after previous event.

    Also I use the notifications to remind user something at defined time.

    I demo this on RP PC. I do not know how it will goes on the Mobile phone which runing the Win8 System.

    Friday, July 27, 2012 6:45 AM