Code Examples Sensors API

From Qt Wiki
Revision as of 15:07, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

English Spanish

Overview

This page points to and provides quick overviews of existing code examples using the Sensors API [doc.qt.nokia.com], one of the suite of Qt Mobilty APIs.

Fall detector

The Fall Detector example [wiki.forum.nokia.com] from Forum Nokia uses the accelerometer in a mobile device to detect if the user has fallen, then uses the

  • Location API [doc.qt.nokia.com] to get the user’s location
  • the Contacts API [doc.qt.nokia.com] to store and access an email address to be notified in the event of a fall
  • and the Messaging API [doc.qt.nokia.com] to send an email notification with photo attachment.

Fall Dector Screen Shot
Here’s the code snippet for the fall detector using the Sensors API:

Use accelerometer to control an Open GL-ES 3D model

This sensors tutorial from Mobile Qt-Entwicklung [mobileqt.de] (Mobile Qt Development) shows the accelerometer in an N900 manipulating a 3D model created using Open GL. The descriptive text is in German [mobileqt.de], but all the code is available in a downloadable package [mobileqt.de] and this demo video [youtube.com] shows you how it works.

Here is the relevant accelerometer code:

Categories: