rus | eng
PDF Print RSS
Multitasking at Windows Phone 7 Series  

One of most question, discussed with consideration of Windows Phone 7 Series is multitasking. As it was clarified, this question calls concern in a great number of users and developers. Let's more in detail consider this question. For this purpose let's see to multitasking implementation in Windows Phone Classic (the old name – Windows Mobile 5.x, 6.x).

In Windows Phone Classic multitasking has been implemented to the full. It means that in the same time some applications can runs without suspending. It, as a matter of fact, some clone of a desktop platform where this process looks similarly. However, let's think – and whether usage of the similar approach for a transportable platform also grounded, as well as for the desktop is real?

Let's try to imagine the typical scenario of mobile devices usage. For certain it will include usage of several applications in turn in a current of durable quantity of time. For example, at present I use some such applications: photos viewer, e-mail reading, reading Twitter feed, review of the current traffic, Windows Media Player, editing and review of documents of Microsoft Office, review of documents PDF, the calculator and other. At durable usage of the device it is possible to detect that in memory are loaded all or a part of these applications, thus at present they are absolutely not necessary, as there is no necessity for their usage. Nevertheless, at present they are really loaded in memory and now executing, load the CPU, occupy memory and spend the battery. Certainly, some part of users watches closely that only necessary applications at present have been loaded but so all users do not. For this reason usage of the similar approach is not so correct for a mobile platform.

In some mobile platforms there is other extreme measure – possibility to start in each time only one application. Such approach also is not correct as sometimes nevertheless it is necessary to start simultaneously few applications. Classical example – usage of a music player at the moment of usage of other applications, for example, mail reading.

Developers of Windows Phone 7 Series have decided not to go to extreme measures and have selected a golden mean. In Windows Phone 7 Series in each time can will be runs only one application. Thus there is a set of system applications which can be run “in a background”. At transition to the main window or switching to other windows, the current application switches to the suspended state. That is interesting, the operating system in any time can kill this process from memory at all. Therefore at the moment of suspending it is necessary to save an application state, and at the moment of return to the application – to restore this state. Windows Phone 7 Series independently saves and restores states, therefore the developer of the application does not need to care of it. The user at switching between applications also will not notice any difference if the application has been remote from memory – it will return to that state in which there was an application last time.

There is also one more type of events which can interrupt application. However, in difference from the previous scenario, in this case interruption occurs for a short period. Such interruptions can happen, for example, at incoming call or at alarm clock. In this case the application continues the executing in a background. However, if the application demands from the user interaction (for example, the game application), the developer of this application can react to similar events and compulsorily pause execution of the application for the period of processing of external event.

The process described above from the point of view of a mobile platform is more correct as allows not to spend resources for performance of unnecessary background applications. Moreover, in this case the application state is saved and restored in an automatic mode that undoubtedly it is very convenient from the point of view of the application developer.

However, a number of tasks cannot be implemented at usage of the described process. There are some tasks which require background working. For example, it can be the application for record of a GPS-track of the user or an alarm clock which should work at a given time. Unfortunately, in that version of Windows Phone 7 Series which has been presented on MIX 2010 this functionality it is not implemented. However, the developers team is engaged at present in this scenario and in the near future we can try to implement such scenarios.

Thus, it is visible that the approach for the organisation of multitasking in Windows Phone 7 Series became more effective, than it has been implemented earlier, in Windows Phone Classic.

26.03.2010 07:05 UTC+4
Avatar
02.05.2010 04:29 UTC+4
really appreciate YOU -- thanks a lot!
Most Valuable Professional (MVP) Microsoft Regional Director