R84 Touch.Beta bugs caused by phonegap new version

Bugs will be moved here once resolved.

Post » Thu Apr 26, 2012 10:44 am


Hi,

I think this is a acceleration bug, and I tried to find the cause of the bug. Maybe it caused by the new version of phonegap.

I export files and delete phonegap.js in the folder. Then zip it and upload to PhoneGap Build. In the apk file "phonegap.js" is a new version(1.6.1),then Touch.Beta and Touch.Gamma cannot work.

I think there is no error in my project. Because I used eclipse to build a apk it can work.(phonegap.1.2.js and phonegap.1.2.jar).



Compare cordova.js with phonegap.js(version 1.2 exported by R84):

phonegap.js
// Get acceleration
exec(successCallback, errorCallback, "Accelerometer", "getAcceleration", []);

cordova.js
// Get acceleration
PhoneGap.exec(successCallback, errorCallback, "Accelerometer", "getAcceleration", []);



--------------
My Project capx
------

System -> Touch.Beta<"-100"
Action: Monster -> Simulate 8Direction pressing Right.zdtpku2012-04-27 02:45:13
B
5
G
1
Posts: 7
Reputation: 604

Post » Wed May 02, 2012 11:12 am

I've made a change that might fix it in the next build. Please let me know if it works or still does not work when it comes out.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Thu May 03, 2012 5:07 am

Thanks.
I have tried the R87 version. Using Phonegap Build it doesn't work until I tilt my phone for almost 10 seconds.
Hope R88 or R88+ can solve this bug, I will stay focused on this problem and give you feedback.
B
5
G
1
Posts: 7
Reputation: 604

Post » Fri May 04, 2012 4:25 am

Hi, @Ashley:

I tried the R88 Version,You have done a great job.

It almost OK to use touch/accelerometer input,but the frequency does't work. So it keeps the default interval in phonegap (10 seconds).

If I use Uncompressed script, it's OK.
This issue maybe caused by the code in minified script:
navigator.accelerometer.watchAcceleration(a,h,{ll:40})}


Because the restriction of New Phonegap Version:
----------------------------
// New:
var frequency = (options !== undefined && options.frequency !== undefined)? options.frequency : 10000;
//Old:
var frequency = (options !== undefined)? options.frequency : 10000;zdtpku2012-05-04 08:22:34
B
5
G
1
Posts: 7
Reputation: 604

Post » Fri May 04, 2012 6:51 pm

Ah, good find, it's a minifier bug. Hopefully you can work around by not minifying for the time being, I'll have it fixed for next build.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests