Mobile Acceleration examples not working.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Example ex00_Acceleration_Ball_Bounce used to work in 2018 but doesn't now. I tried it on 2 phones today. (Android 6.0.1, Android 10). I made a small program just showing the AccelerationX,Y,Z values - always zero. I guess the code hasn't changed so the problem is security on the phone. I've tried giving Chrome all the permissions available - no better. ex03_Shake_Ball_Bounce the same.
This was a great feature, I've seen 20 10-year-olds all shake their phones with this and laugh. Shame it doesn't work now.
function setup() {
createCanvas(displayWidth, displayHeight);
fill(0);}
function draw() {
background(255);
textSize(36);
textAlign(RIGHT);
text(frameCount , 250, 40);
text(accelerationX, 250, 80);
text(accelerationY, 250, 110);
text(accelerationZ, 250, 140);}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running ex00_Acceleration_Ball_Bounce and ex03_Shake_Ball_Bounce on the reported Android devices and inspect how accelerationX, accelerationY, and accelerationZ are populated. Compare behavior with the small program shown in the issue; done means the acceleration values are no longer always zero and both examples respond to device motion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100