none
Starting remote app service FROM background task not supported? RRS feed

  • Question

  • In my app, I'm trying to use remote app service. I need to start remote service from background task with ToastNotificationActionTrigger, so that when user takes action with toast notification I want to broadcast this action to other devices.

    However, it almost never works (works in 1/50 attemps). According to documentation about RemoteSystem.RequestAccessAsync this method must be called from the UI thread, thus it cannot be called from background task, right?

    I'm wondering if understand it right and if so, if there is any workaround as I find this as a massive limitation of project Rome.

    Sunday, January 21, 2018 9:40 AM

All replies

  • Maybe you can explain us why it should be run from a task. A task is done and then it ends. It seems if you want to use tasks like a kind of parallel process which never stops until the application stops. 

    Success Cor


    Sunday, January 21, 2018 9:55 AM
  • Thanks for prompt reply.

    I have an alarm application. It schedules toast notifications. When user snoozes alarm, bg task with ToastNotificationActionTrigger is started. From this bg task, I want to broadcast the information to other devices, hence user doesn't need to snooze the notification on each device.

    Anyway, I find it as common scenario, that developer wants to broadcast information from bg task.

    (No I cannot user universal dismiss feature, as it doesn't deliver any information what button was pressed, what was selected in snooze combobox etc.).

    Sunday, January 21, 2018 10:30 AM
  • If you give a plumber a task to make your toilet he also does not know where your coffee maker is located. 

    Maybe you tell always to such a guy, take coffee when you want, but than you are not assigning him only for a task but then he is in your process doing that. 

    Like I wrote before, a task is to often seen as a process. 

    :-)

     

    Success Cor

    Sunday, January 21, 2018 10:38 AM