Shake not working on Android

Hi all,

I have a problem shake is not detected on Samsung J5.

When I test my app in Corona SDK Simulator shake is detected normally.

I thought I messed up somewhere in the code, so I build up Corona Accelerometer Sample App.

The same problem: shake is not detected on Samsung J5! 

Gravity x, y and z are detected normally.

I set Accelerometer interval to 60… no help.

Is my phone broken or… ?

Do I have to set up something in build.settings?

Tnx!

GG

It could be something with that specific device. I’ve noticed that Android requires a harder shake than iOS does.

Rob

I just installed one “Shake to lock your screen” Google play app (on the same phone).

And gentle shake is required to lock my screen.

Ok!
Shaked it hard, and it works! :slight_smile:

Any way to increase sensitivity?
Set acc. interval to more than 60?

There are no settings to enable the accelerometer or having to do with shaking.

I would put some prints in your code where you’re handling accelerometer events and print out the values including the value of .isShake.

Plug your device into the USB port and use adb logcat to look for errors, warnings and the value of .isShake.

Rob

Be careful not to rip the cord out when shaking!   :smiley:

My right headphone bips a little now :smiley:

Ya. Android requires a bit harder. i just hit the phone on the table to simulate a shake.

Please do not hit your phone on your table.

It could be something with that specific device. I’ve noticed that Android requires a harder shake than iOS does.

Rob

I just installed one “Shake to lock your screen” Google play app (on the same phone).

And gentle shake is required to lock my screen.

Ok!
Shaked it hard, and it works! :slight_smile:

Any way to increase sensitivity?
Set acc. interval to more than 60?

There are no settings to enable the accelerometer or having to do with shaking.

I would put some prints in your code where you’re handling accelerometer events and print out the values including the value of .isShake.

Plug your device into the USB port and use adb logcat to look for errors, warnings and the value of .isShake.

Rob

Be careful not to rip the cord out when shaking!   :smiley:

My right headphone bips a little now :smiley:

Ya. Android requires a bit harder. i just hit the phone on the table to simulate a shake.

Please do not hit your phone on your table.