Click/Touch doesn't work on mobile via PhoneGap with 0.7.1, works with 0.4.2
See original GitHub issueHi,
I crafted a very, very simple minimal CraftyJS game – something like (minus boiler-plate code):
Crafty.e('2D, Alpha, Color, Canvas, Mouse, Touch').attr({ "w": 48, "h": 48 }).bind('Click', function() { Crafty.audio.play(someId) });
I tried swapping Click
with Touch
. It works fine on the web, but when I shove it into a PhoneGap container and deploy it on my phone (OnePlus X), the click handler never fires. I even added a “.color('blue”)` to make sure that it’s not just that audio’s broken on my phone.
Is this something that’s supposed to work, or is it something that’s not supported?
I’m using CraftyJS 0.7.1 with PhoneGap 6.3.0 (I think)
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
PhoneGap does not stop loading · Issue #913 - GitHub
Was having the same issue with Windows 10 (x64), but I got it working by doing the following: Installed the desktop app using...
Read more >Phonegap build app does not work properly on android
I develop application using cordova and Phonegap Build to get web, iOS and Android versions. iOS version works just fine, but Android's one...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
After lots of hoopla related to network access, I can confirm that the touch event works as expected on my device.
I noticed that in both web (Chrome from desktop) and on my device, I have to (after the first click) click the square several times to get it to toggle – but the first click always changes it from green to blue.
You can close this issue or leave it open as per your processes. As far as I’m concerned, problem solved!
Sorry, it was always my intention to test this on my real device; I just didn’t get time yet. It’s my intention to get to this by the end of the week.