Tasks are as follows:

1) Create a process that in the background increases a certain number by one for a certain time interval.

2) Create a process that in the background will listen to a certain message (for example, we received a notification from the server, and we have to show it to the user) I read the article , but it did not help. Installing triggers is not what I need.

PS application runs on p2p architecture

  • one
    Try to write more detailed questions. To get an answer, explain exactly what you see the problem, how to reproduce it, what you want to get as a result, etc. Give a sample code. - Kromster
  • The problem is that there is no idea how to implement it (what code to write). - Sanych Goilo
  • In general, the question of architecture, right? What are you trying to write at all? I do not understand why you for the described tasks UWP. - Walter Nuss
  • Something like a messenger. You need to display a notification when a new message arrives. If this is important, then the exchange occurs via the P2P protocol. - Sanych Goilo

1 answer 1

1) You can implement this requirement using the Timer class from .NET. http://www.dotnetperls.com/timer

2) For these purposes, you could use a web service (SOAP or REST). The server sends a request to your program, and it responds. Well, or maybe SignalR `

UPDATE

2) Since UWP applications can go to Suspend-Mode, it is necessary that the messages from the server remain available at any time. I would implement this function with Queue. For example, Rabbit MQ or Azure Storage Queue. The server sends messages about any action in the Queue, and your application at certain intervals and after leaving Suspend could take messages from the queue and process them.

  • This, in theory, will not drive for UWP: the process can be led to suspend. - VladD
  • @VlaD: sorry, did not know such details, now I will forward the answer. - Walter Nuss
  • VKontakte application somehow works minimized. As well as the application mail. Some kind of dancing with a tambourine. - Sanych Goilo
  • Just checked, the application VC continues to display notifications even being closed. - Sanych Goilo