7
[Android SDK v14.1.2 - v14.1.5] Shake is being invoked repeatedly
complete
A
Alex Branti
We've just released Shake to all users and we are getting a few reports (9 reports from 5 users) saying that the feedback form (Shake UI) is appearing without reason. I've analyzed the activity history for all reports and they have the same behaviour: we can see 'Shake: Device shaked' and then 'Shake was invoked and closed without submitting feedback' is logged with less than 1 second between two calls. These two messages appear several times in the activity history and users are complaining that they can't use our app.
I'd list to ask a few questions:
- Are there known issues with the Shake gesture in certain devices/OS versions?
- Is it possible to register a callback to notify us when Shake was invoked using the gesture (we could use it to disable the gesture for certain users)?
- Is there a recomendation to add a UI setting to disable Shake gesture?
Thanks!
Log In
Activity Feed
Sort by
Sanjin Grahovar Sadikovic
complete
Shake detects sensor events and determines if events are accelerating.
It looked like G force was always larger than expected ~40 on certain devices due to faulty sensors.
This made all sensor events considered accelerating (during Shake, most of the sensors are considered accelerating, but not all).
This should be resolved in latest
Shake Android SDK - v15.1.0.
Sanjin Grahovar Sadikovic
in progress
Mislav Stanic
open
A
Augusto Pedroza
Still seeing this issue with version 14.1.5.
We still "I/Shake: Device shaked" in our logs. 15 instances to be precise
2021-05-18T18:25:04.931000+00:00 I/Shake: Device shaked
2021-05-18T18:25:05.182000+00:00 I/Shake: Device shaked
2021-05-18T18:25:05.490000+00:00 I/Shake: Device shaked
...
2021-05-18T18:25:15.689000+00:00 I/Shake: Device shaked
Since these happening so close to each other I would recommend that you guys take that into consideration before reporting multiple gestures.
This is a Pixel 3a
M
Mislav Stanić
Augusto Pedroza: Can you provide me an url to the feedback with the mentioned logs so we can check it once again?
A
Augusto Pedroza
Mislav Stanić: https://app.shakebugs.com/route/O4N8KZ3Q/feedback/368
A
Augusto Pedroza
Any updates? We will have to once again disable the shake gesture on Pixel 3a's due to the increase of unintended reports.
M
Mislav Stanić
Augusto Pedroza: Nothing new yet, in the logs it is visible that shake is detected multiple times but this seems to be caused by faulty/unexpected data retrieved from the device sensor. That is something we don't have an impact on so we'll lower the priority for this ticket. However, we will still monitor this and if we notice that it happens more often or find a device with the similar behavior, we'll move it to the top of our backlog and inform you about the details.
A
Augusto Pedroza
Mislav Stanić: we have had several users reporting this issue so if faulty sensors are a reality shake should mitigate that. I always see these coming in bursts so honoring the first one and ignoring the short burst would already provide a better experience. Another option is to give us a callback and let as handle the triggering of this event.
M
Mislav Stanić
Augusto Pedroza looks like the shaking gesture is constantly detected, so I assume ignoring
some
of said events won't provide a better UX.We're unfortunately not able to find a device that behaves like that in order to find an exact solution to this soon.
So I'd suggest you to disable the shaking gesture for specific users/devices. You could use
Shake.setInvokeShakeOnShakeDeviceEvent
method before Shake.start
and set it to true/false depending on the desired behavior. Would that help?A
Augusto Pedroza
Mislav Stanić: My recommendation is to handle the unusual burst of shake gesture, the first one would be honored but the ones following it within 1-2 seconds would be ignored.
M
Mislav Stanić
Augusto Pedroza that's an interesting suggestion, thanks.
However from what I can see from the attached logs is that the shaking gesture event is triggered
constantly
(every few seconds), not just in bursts (milliseconds and then nothing for an extended period of time). So after the Shake UI is closed, another shaking gesture event will inevitably be detected again in a few seconds, we'll honor it as you suggested, and it'll reopen the Shake UI again, won't it? 🤔 Just thinking.I believe we can't just throttle an event because it happens uncontrollably, so I suppose we'll have to come up a different approach?
Happy to hear your thoughts.
P
Peter Simic
in progress
Still monitoring closely 👀
M
Mislav Stanić
Augusto Pedroza Alex Branti We have tested this on several devices including Google Pixel 3a but haven't noticed the same behavior (Shake didn't start automatically without shaking the device). We also checked with your app 1.30.0 version and it was the same.
However, we have noticed duplicate logs for "Shake: Device shaked".
This is not happening anymore in the 14.1.3 version which was released a few days ago. So I would suggest you to update the version and monitor if the hiccup is still appearing for you.
If you have access to the problematic device it would be great if you could check the sensor status and try whether calibration helps.
In the meantime, we will still continue investigating this and if we find anything new I'll update you here.
A
Augusto Pedroza
Could you guys review your handle shake gesture code to ensure you guys are not forgetting to clear anything?
I can see multiple instances of "Shake: Device shaked" entries in our logs.
M
Mislav Stanić
Augusto Pedroza: Hi,
The testers will try to reproduce this behavior on several devices today. If they find anything I'll update you here.
We are using https://github.com/square/seismic for shake gesture detection and from the code side, it looks like everything is good.
I suspect that it is caused by inaccurate sensor data. If you have access to the problematic device it would be great if you can calibrate the accelerometer sensor and check the accuracy type which it is returning.
If that is the case, disabling the shake gesture invoke in the case sensor is returning inaccurate data (SENSOR_STATUS_UNRELIABLE) will probably solve that.
M
Mislav Stanić
Hi Alex,
We didn't have anything similar reported yet.
Currently, there are no callbacks for the Shake invoke event. Feel free to create a ticket and we'll implement it in one of the next releases depending on the votes.
If you've noticed that this happens to your users regularly, I can suggest you to invoke Shake from code on the button press until we investigate this. The shaking gesture is detected using accelerometer data so it could be related to a specific device — we'll investigate and fix it if needed as soon as possible.
I have a few more questions regarding this hiccup if you don't mind:
- Is it happening to a specific user, or a specific device?
- Are you using the Shake.showmethod somewhere in your code?
Regards
A
Alex Branti
Mislav Stanić: Hi Mislav, right now we got 9 reports from 5 different users. that is a low number and we also think it might be related to a hardware failure in the accelerometer.
Regarding your questions, 4 users are using Google Pixel 3a XL running Android 11, 1 user is using a HTC 2Q7A100 running Android 9.
We are using
Shake.show
when user taps in 'Report a bug' button in Settings screen. The issues are being reported even during onboarding flow, before user has access to Settings screen.We will keep monitoring this issue and probably disable shake gesture until we understand what is happening.
M
Mislav Stanić
Alex Branti: Great.
I'll pass this ticket to our testers and let them try to reproduce the same behavior. Speak soon
A
Alex Branti
Mislav Stanić: Thanks, Mislav. We are seeing more reports every day about users not being able to use our app because the feedback form pops up several times. Most of reports are coming from Google Pixel 3a and Google Pixel 3a XL.
A
Augusto Pedroza
Mislav Stanić: Please check my latest comment.