Sensors don't work on Android

I really tried a lot to find out why no “maze game” of the community would work on my phone, in live mode or with the apk, and I just realized that it is probably a Thunkable built bug…

In short: if you clean all app data, using the sensors might work on your first try. After that, nothink will work again, unless you clean up all data again.

I’ve made a video for making it easy to explain, based on a simple app, that has this 3 sensors as invisible items: gyroscope, accelerometer and magnetometer (i’ve tried with them all and got always the same result, but the video is the attempt with the magnetometer sensor).

The only asset my program has is a label that shows one of the outputs of the given sensor. On the video I used the X output of magnetometer.

I have opened the same project (GyroTeste) 4 times on the video:

1st try: With a clean start, I open Thunkable and then my project and all seems to look ok, with the label giving me real time reads on the Magnetometer sensor. I click to see the code, so you can realize that there is a supersimple code. I then go back to the project, it is working, and then I hit back twice, closing the app.

2nd try: Then, I open the app again and open the same project again. But now, it only shows “Label”, meaning that no read on the sensors is made. I open the code, so you can see it is the same code of the first time (it is the same project), and go back to the project, but it is still not working. Then I go back to the menu

3rd try: On the menu, I try to open the project again. Now the project doesn’t even open. I wait a little bit then I need to close the app.

4th try: I close the app, and I force clean all Thunkable data. Then I open the app again, need to login again, and then things work again. The sad part is that now I know that this is the only time it will work before I need to clean all app data again.

Is there anything I can do to make things work? I was planning to use Thunkable for teaching students on making apps, but I’m scared about the risks of frustration when simple things doesn’t work with no clear reason.

If anyone has any tips, please let me know.

Edit:
My cellphone is a Xiaomi Redmi Note 7
Android Version: 9 (Pie)

try adding accelerometer

Hi welcome. I tested the gyroscope and Magnetometer blocks on my Redmi Mimax3. All parameters (alpha, gamma, beta, x, y ,z) seemed to work fine. I tried closing and opening again either force close or “back” button on thunk live app. Not much issues.

You may want to download the apk and install on the phone to see if its the app issue or thunk app live test issue.

I did it with the 3 sensors, no one has worked…

With the apk it is the same issue of the live test, you need to clean all cache everytime!

try on other devices

Hello ekan, thanks for the support.

I’ve tried on a Moto G6 Play, with an Android 9, it didn’t work.
I’ve also tried on a Samsung A7 2017, with Android 8. In this case it worked ok.

This may indicate a relevant compatibility problem. Today I installed v212 of Thunkable but it made no difference. I’ve also updated my phone to Android 10, but still the same problem.

you can add this as solution it will be better as per rules

I don’t feel that the problem is solved, as in 2 of 3 phones i’ve tested the program it didn’t work.

same happens with me no maters