Sensor Functionality

Hello everyone,

I had included some actions in my project to try out sensor functionality on Flipabit.

Added two text fields for obtaining latitude and longitude (as project changes) from
Project>property>project>Sensors>GPS>(latitude or longitude in each case).

I added a button to enable GPS when pressed.

And I checked the GPS sensor under the Sensors Tab.

On testing on a device, text fields do not return any updated latitude and longitude value (default is zero for each).

The device has location on the list of permissions but says “never used”. And compared to other location-based apps, the location icon (on status bar) never comes up when it’s in use.

From my little understanding, if location appears on a device’s list of permissions, then the right permission access was declared in the manifest file; and I assume the right “uses feature” would also be present in the manifest file right?

In summary, my rough guess is app has access to location (by permission) but is not using the sensor, and I don’t know why.

Any help would be appreciated.

Thanks a lot.

Hello everyone,

I would really appreciate any help on the aforementioned.

A core part of my project is heavily dependent on this, and I also observed same issue when trying out other sensors.

In summary, does the sensor functionality on Flipabit work practically, or is there a bug therein that requires fixing?

*Update

Possibly an oversight but I was eventually able to get the sensors to work by using the “project>start sensors” action.

However, this works only when I turn off power saving and battery optimization modes on testing device; for unknown reasons these seem to interfere with the functionality of the sensors (other sensor-reliant apps work fine with battery saving modes on).

But even still, its a bit gimmicky at best; sometimes it works, other times it doesn’t.

I still may be missing something or it might also be a bug.

I hope there’s a fix for this soon.

Additional permissions for the application are required to work in power saving mode.

Can you describe in more detail what is not working and under what conditions so that we can reproduce it? You can also send your project to [email protected] with a description of the problem so that we can help.

Thanks for the response Michael!

What additional permissions could be required to work in power saver mode?

But while on that subject, after troubleshooting extensively, I was able to get sensors working with the actions: “project > property > project > sensor > true” as well as “project > actions > common > sensors start” to enable sensors and start reading data from sensors respectively. I also checked individual sensors under sensors tab.

I observed that the app functioned properly and asked for sensor permission at start up when I made “open project” the source event of those two actions.

However, it still failed to work sometimes.

I thought this had something to do with other actions sharing the same source event (open project) as the two actions above at the same delay time; perhaps Flipabit had issues prioritizing these actions at app startup, so I took off those other actions completely.

But beyond this, I realized that the main cause of this issue was the performance setting: asynchronous (to enable asynchronous loading). Whenever this option was checked, sensors functioned properly, but app loaded very slowly; almost to a standstill. And whenever the option was unchecked (my default setting), app loaded fine but sensors did not work.

Project is still in its confidential stage, so I made a simple example to attempt reproducing the issue.

I still may be missing something but I hope this helps.
sensor data.flp (6.2 KB)


Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.