Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Simulating Device Use

"Generic settings"

You can use Qt Simulator to test applications that use the Qt System Info API to access general information from the mobile device. Mobile devices have been designed for use when mobile. Keep the characteristics of mobile devices in mind when you create applications for them. Use Qt Simulator to simulate the behavior of applications on different device models in different conditions:

Running Out of Battery Power

Mobile devices are not constantly connected to a power outlet, but run on battery power. Optimize power consumption to keep the total consumption at an acceptable level and to prevent users from running out of battery power. In addition, make sure that applications run successfully in low-memory condition or display a clear and informative error message.

You can write a script that decreases the battery level setting, to check how applications behave when the device runs out of power. You can load an example script that decreases the value for battery level, scripts/examples/runOutOfBattery.qs. For more information on loading scripts, see Scripting.

You can also check how applications behave, when the mobile device is connected to a power outlet or it is charging.

Change the Battery level and Power state settings in the Generic section.

Using Silent and Offline Profiles

Profiles allow users to adjust and customize ringing tones, alert tones, and other mobile device tones for different events, environments, or caller groups. Users can change the active profile on their devices.

The Offiline profile (flight mode) prevents mobile devices from accidentally switching on, sending, or receiving messages, or using WLAN, Bluetooth, GPS, or FM radio. In addition, it closes any Internet connection that may be in operation when users select the profile.

Test applications with different profiles to make sure that:

  • Application sounds do not override the currently selected profile. Sounds should not play in the Silent profile, unless the application is intended for audio playback.
  • Applications work correctly in the Offline profile, with the phone capabilities and network connections disabled.

In the Generic section, Profile field, select profiles to test the application with a particular profile.

Changing Device Language

Implement predefined texts in the application UI using logical names instead of hard-coding them to the application. This enables localization by changing the language packet (LOC file) that is used.

After translation, UI texts in different languages may take up more space than the original text. To prepare for text expansion, avoid using long and difficult UI text.

Do not truncate the predefined UI texts even if the components may do it automatically. This makes it difficult to understand the texts and creates a feeling of unfinished software.

You can fine-tune UI text strings to different display sizes by producing separate text strings for the small and large displays (orientation, aspect ratio, physical size). This avoids the problem of having abbreviated text strings when there is plenty of display space available.

When users change the language settings on the mobile device, the localized version should be started automatically.

Click the Advanced Settings button to display the language settings in the Generic section:

  • Language displays the current system language as a two-letter ISO 639-1 language code. For example, EN.
  • Country code displays the current system country code as a two-letter ISO 3166-1 country code.
  • Available languages displays available Qt language translations as two-letter ISO 639-1 language codes. If translations cannot be found, it displays the current system language.

Change the Language and Country code settings to test that the localized versions of your application start correctly and look and function as they should.

Click Show next to Available languages, and then click Add to add new language codes. Use the ISO 639-1 language codes.

Supporting Device Features

Mobile devices support different sets of device features, depending on their configuration and the underlying hardware. When you develop applications for multiple devices, you can programmatically determine which platform, software version, languages, features, and accessories a particular device supports. This allows you to programmatically enable and disable application functions for a particular device.

Change the Features in the Generic section to check how your application behaves when a particular device feature is supported or not supported. For example, devices can support several physical connection methods, such as Bluetooth, Infrared, and USB (universal serial bus) for downloading data. Devices can also have a Memory Card available for storing the data.

Change the Operating System, Qt, and Firmware Versions to check how your application behaves on a specific version. Click Change to specify the version. Specify firmware versions as follows: major.minor.build. If a particular version does not include the build part, set it to 0. If a particular element is not available at all, the API returns the error Not Installed.

Accessing Services

The basis for access security is the effective identification of the users and the equipment they are using. The device can be protected with a lock code, while the SIM card, memory card, and applications can have their own PIN codes and passwords. For enterprise applications, this can mean that only a specific user with a specific application, device, memory card, and SIM card can access the corporate data.

Devices are identified by international mobile equipment identity (IMEI) and international mobile subscriber identity (IMSI) numbers. Change the IMEI and IMSI numbers in the Generic section to test access security for applications.

Handling User Input

In order to support as many target devices as possible, applications must support different input control configurations:

  • Hardware keypad and touch
  • Touch-only
  • Hardware keypad only

For devices that support both hardware keypad and touch interactions, consider which is the best mode of interaction for the application. For touch-only devices, all interactions should naturally be touch-optimised.

For devices that support only the hardware keypad, touch-only components can be flagged out of the application. This way it is possible to create applications that will function with different device configurations.

Change the Input methods in the Generic section to test how the application handles different input methods.

Identifying Devices

You can specify the Manufacturer, Model, and Product name to allow applications to identify the device. You can write any values in the fields. For example, you could set Manufacturer to Nokia and Model to N97.

Using Colors

Like computer monitors, mobile devices use an additive color process. Unlike print media, which begin with a white surface, the computer screen begins as a black surface to which colored light red, green, and blue (RGB) is added.

Although early mobile devices supported very few colors, color support is now quite robust, with a large proportion of devices providing 12-bit (4,096 colors), 16-bit (65,536 colors), or 24-bit (16 million colors) color support. However, similar to the variety in screen size, many devices in use support varying color depths, with newer, low-cost models typically supporting 12- or 16-bit color depths.

Applications can query the color scheme of the mobile device and adapt to it. For example, applications can switch to a night color scheme when brightness falls below a certain value.

Change the Color depth and Brightness values in the Generic section to change the way the application perceives them.

[Previous: Quick Tour] [Next: Simulating Networking]

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

s.parentNode.insertBefore(ga, s); })(); -->
Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. Microsoft ouvre aux autres compilateurs C++ AMP, la spécification pour la conception d'applications parallèles C++ utilisant le GPU 22
  2. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  3. RIM : « 13 % des développeurs ont gagné plus de 100 000 $ sur l'AppWord », Qt et open-source au menu du BlackBerry DevCon Europe 0
  4. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 12
  5. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
Page suivante

Le Qt Developer Network au hasard

Logo

La création de colonnes dans une ListView en QML

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtsimulator-1.0
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web