Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Emulator vs Device Functionality

From Wiki
Jump to: navigation, search
Article Metadata
Compatibility
Platform(s):
Symbian
Article
Created: vasant21 (26 May 2007)
Last edited: hamishwillee (23 Jul 2012)

The emulator behaves very similarly to a real device. The entire Symbian OS code is compiled for both the target device and emulator build targets using the same source code – with some required deviations (e.g. if you have any assembly language functions, you must obviously provide both x86 and ARM versions). So, not only can the emulator be used for GUI applications, but you can use it to develop system-level code. Will everything that works on the smartphone, also work on the emulator? Not everything – no emulator is that good. But for the most part it is equivalent.


Main differences between the Emulator and the Device

Hardware

The most obvious difference is that the underlying hardware of the emulator is different from that of the device. The PC processor instruction sets are different – the PC uses x86 and the device uses ARM – but this is easily hidden via the C/C++ language. More importantly, however, the peripheral hardware is different, so you cannot use the same device driver and hardware abstraction layer code on both. On the emulator, hardware accesses are mapped to appropriate Windows API calls.


Pixels and fonts

Although in most cases, the display of a GUI application will be very similar on the emulator and on the device, there are likely to be slight differences in pixel sizing between the two. For instance, it is possible for text to be truncated on the emulator and not on the real device, or vice versa. This can be an issue, if you rely on the emulator alone to perform language translation testing, for example.


Static variables in DLLs

Static variables are allowed in the emulator, but not in the real device. Be careful of this if you are doing most of your development on the emulator – you’ll want to avoid having massive global variable search and destroy missions late in the project.


Single process versus multiple processes

The emulator runs as a single process, while the device supports the multiprocessing capabilities of Symbian OS. In Symbian OS v8 and above, this difference is hidden and the APIs that start and control processes are emulated. However, in Symbian OS versions before that, you need to have special logic (enclosed by #ifdef __WINS__) that uses threads to emulate the processes. Thankfully, there is not much code needed to implement this.

This page was last modified on 23 July 2012, at 04:25.
292 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×