Sensor APIs do not work

Bug #1349231 reported by XiaoGuo, Liu
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
qtcreator-plugin-ubuntu (Ubuntu)
Invalid
Undecided
Unassigned
qtubuntu-sensors (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

 OrientationSensor {
            onReadingChanged: {
                if ( reading.orientation === OrientationReading.TopUp) {
                    console.log("TopUp")
                } else if ( reading.orientation === OrientationReading.TopDown) {
                    console.log("TopDown")
                } else if ( reading.orientation === OrientationReading.LeftUp) {
                    console.log("LeftUp")
                } else if ( reading.orientation === OrientationReading.RightUp) {
                    console.log("RightUp")
                } else if ( reading.orientation === OrientationReading.FaceDown) {
                    console.log("FaceDown")
                } else if ( reading.orientation === OrientationReading.FaceUp) {
                    console.log("FaceUp")
                }
            }
        }

The "FaceDown" and "FaceUp" events are never fired. Also

       AmbientLightSensor {
            active: true
            onReadingChanged: {
                if (reading.lightLevel === AmbientLightReading.Dark) {
                    console.log("It is dark")
                } else if ( reading.lightLevel === AmbientLightReading.Twilight) {
                    console.log("It is moderately dark")
                } else if ( reading.lightLevel === AmbientLightReading.Light) {
                    console.log("It is light (eg. internal lights)")
                } else if ( reading.lightLevel === AmbientLightReading.Bright) {
                    console.log("It is bright (eg. shade)")
                } else if ( reading.lightLevel === AmbientLightReading.Sunny) {
                    console.log("It is very bright (eg. direct sunlight)")
                }else if ( reading.lightLevel === AmbientLightReading.Undefined) {
                    console.log("It is unknown")
                }
            }
        }

Only "AmbientLightReading.Light" is fired no matter how the ambient light environment is changed.

Thanks & best regards,
XiaoGuo

affects: goget-ubuntu-touch (Ubuntu) → qtcreator-plugin-ubuntu (Ubuntu)
Zoltan Balogh (bzoltan)
Changed in qtcreator-plugin-ubuntu (Ubuntu):
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtubuntu-sensors (Ubuntu):
status: New → Confirmed
Revision history for this message
Lorn Potter (lorn-potter) wrote :

I can confirm on ubuntu touch that FaceUp and FaceDown are not being handled or signaled when they should be (qtubuntu-sensors orientation does not even handle it)

As well, there is no implementation for AmbientLight in qtubuntu-sensors.

Revision history for this message
Tamas Miklos (aida64-app-developer) wrote :

I can confirm AmbientLightSensor.onReadingChanged is not called when the light sensor reading is changed. Affects both my test devices: Aquaris E5 HD and Aquaris M10 FHD, both running OTA-12. Affected app is AIDA64 (Sensors page in there) for example.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.