Buttons unresponsive under Phonegap/WebOS/Android

Discussion and feedback on Construct 2

Post » Wed Feb 20, 2013 10:46 pm

So I just tried running another small performance test app on my HP Pre 3 (weirdly enough, the second layout is displayed 20 FPS faster than on my laptop) but ended up with unresponsive button behaviour.

This isn't the first time for this to happen (in the past, it also happened on my Android tablet) and I'd really like to find out why this is the case.

Here's my .capx:

https://docs.google.com/file/d/0B4HbmIw0kk7FRnFsTWlvTDhtN0U/edit?usp=sharing

Disabling "Use Mouse Input" on the touch object makes me end up with an 100% unresponsive app (the button does switch to on whenever I touch it, but nothing happens). Setting it to On or replacing the "On Object Touched" event with "On Object Clicked" makes it work somewhat, but still requires me to touch the button several times and, sometimes, to pause and unpause by swipping upwards (which accesses the WebOS card view)

While the performance is really not that bad, this particular Phonegap Build port suffers from another three issues, which I'd also like to explain:

1. There's no application icon (possibly due to either the standard icon being too big or being packed wrong).

2. There's no audio, even though I made sure to include and call an .M4A audio piece (M4A should be the standard for WebOS. Previous tests with OGG didn't work either)

3. I can't switch the orientation. No matter the angle, the orientation is always staying the same (that's despite having the orientation set to universal on export).

Help is very much appreciated.
B
6
S
2
Posts: 206
Reputation: 1,685

Post » Wed Feb 20, 2013 11:27 pm

Curious, are you using Phonegap build, or building manually from Eclipse?

I haven't tried Phonegap build, but I built an app with eclipse and phonegap a few weeks ago and didn't have any issues. The only issue I had was generating double touches when I had Use Mouse Input set to YES.
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Wed Feb 20, 2013 11:35 pm

Is there a reason you are using the touch event instead of the button - onClick event?

I've never used buttons, so maybe they don't work with touch if you use the OnClick event?ArcadEd2013-02-20 23:36:14
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Wed Feb 20, 2013 11:43 pm

Phonegap Build.

I haven't yet looked into manually building it with Eclipse (though this would be the obvious solution for a quick fix), since I'd have to download Eclipse first and that's always a pain (I'm on 384kbps).

Is Eclipse still as JAVA (AKA The Source of All Evil) centric as it used to be? That's one of the reasons I went with Visual Studio 2010 Ultimate, back when I had to choose a set of tools for my day job.


EDIT: No particular reason. I was just trying several ways of accessing the buttons. None of which really seemed to work.

The touch event does indeed not work. But neither does onClick (well. Not accurately, anyways. Pushing the button anywhere from 5-50 times is definitely not the kind of experience I was going for). Blinx1232013-02-20 23:46:31
B
6
S
2
Posts: 206
Reputation: 1,685

Post » Wed Feb 20, 2013 11:57 pm

@Blinx123 I have never had any luck with using the button object in PhoneGap or any other mobile wrapper. What I usually do is use sprites as buttons, this way I can make them match my games theme better, and they always work.

Here is an old example I made a while back with a rollover effect:

https://dl.dropbox.com/u/43763487/examples/buttonexample.capxWink2013-02-20 23:59:57
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Thu Feb 21, 2013 12:02 am

I'm a visual studio man myself, so yes Eclipse is still very Java driven. I don't like it much either, but I am able to use it for what I need and get out. Same for xcode.

B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Thu Feb 21, 2013 12:09 am

@Wink

Ya. I've done the same with my memory game. What's weird though:

1. This approach doesn't seem to work all too well in WebOS either (it did work absolutely fine in Android)
2. As soon as I manage to actually get in the game, flipping a card (a basic animated sprite) examines the same weird behaviour as with the buttons (i. e. takes approx 30 seconds and several touches).

Tomorrow, I'll try to manually wrap my IPKs. Something is definitely off and chances are it's Phonegap Build.

EDIT: I just realized my explanation might've been a bit misleading. The buttons actually are responsive all the time. It's the events that won't fire. Blinx1232013-02-21 00:17:55
B
6
S
2
Posts: 206
Reputation: 1,685

Post » Thu Feb 21, 2013 12:29 am

@Blinx123 I noticed that you are using a Multiline box plugin in your .capx. I wonder if this might have something to do with your issue? Most plugins I have tried seem to work with phoneGap on Android but not with accelerated wrappers. But there is a firs time for everything.

I don't have a WebOS devise to test on right now but it is on my list of devises to get.
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Thu Feb 21, 2013 1:48 am

Well. I can't imagine, but I'll try to remove it anyways.

I added the multiline plugin to see whether it would display correctly on a mobile device (which it indeed does. The keyboard also works as it should).

WebOS is a pretty great little OS. Too bad it's on its deathbed.

B
6
S
2
Posts: 206
Reputation: 1,685

Post » Fri Feb 22, 2013 3:03 am

So I just went to HTML5Test.com to find out why exactly audio wouldn't work.

Turns out, WebOS 2.x does support neither AAC nor OGG (I was referring to the Enyo 1.0 SDK before, but apparently that info was only good for WebOS 3.x) but only WAV.

Now I'm not entirely sure what that means for me.

I've never used WAV as an audio resource for background music before, as I was under the impression that:

a) Being uncompressed, files are just way too big for several minutes/hours of music.

b) WAV lacks the concurrency of OGG/AAC.

a) is, in all likeliness, correct but please someone tell me I'm wrong about b) ;)

On another note: Since Construct2 forces me to convert WAV to OGG/AAC, I'll probably have to manually change all audio tags within the app's source. Correct?

EDIT: I just realized something. Apparently, the touch issue is due to the way Construct2 handles touch events. I haven't yet looked into the produced code, but this just became apparent after trying the touch emulation within Construct2. Blinx1232013-02-22 03:27:07
B
6
S
2
Posts: 206
Reputation: 1,685

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 15 guests